Skip to content

Commit

Permalink
Refactor form layout classes in entity files
Browse files Browse the repository at this point in the history
  • Loading branch information
dedanirungu committed Feb 22, 2024
1 parent 87ef885 commit dd46b67
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions Entities/BillingCycle.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ public function structure($structure): array
$structure['table'] = ['title', 'slug', 'duration', 'duration_type', 'published'];
$structure['form'] = [
['label' => 'Title', 'class' => 'col-span-full', 'fields' => ['title', 'slug']],
['label' => 'Duration', 'class' => 'col-span-6', 'fields' => ['duration', 'duration_type']],
['label' => 'Setting', 'class' => 'col-span-6', 'fields' => ['published']],
['label' => 'Duration', 'class' => 'col-span-full md:col-span-6', 'fields' => ['duration', 'duration_type']],
['label' => 'Setting', 'class' => 'col-span-full md:col-span-6', 'fields' => ['published']],
];
$structure['filter'] = ['title', 'duration', 'duration_type', 'published'];

Expand Down
4 changes: 2 additions & 2 deletions Entities/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ public function structure($structure): array
$structure['table'] = ['title', 'username', 'database', 'ip_address', 'port', 'type', 'published'];
$structure['form'] = [
['label' => 'Title', 'class' => 'col-span-full', 'fields' => ['title']],
['label' => 'Setting', 'class' => 'col-span-6', 'fields' => ['username', 'password', 'database', 'ip_address']],
['label' => 'Other', 'class' => 'col-span-6', 'fields' => ['port', 'type', 'published']],
['label' => 'Setting', 'class' => 'col-span-full md:col-span-6', 'fields' => ['username', 'password', 'database', 'ip_address']],
['label' => 'Other', 'class' => 'col-span-full md:col-span-6', 'fields' => ['port', 'type', 'published']],
];
$structure['filter'] = ['title', 'username', 'published'];

Expand Down
8 changes: 4 additions & 4 deletions Entities/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ public function structure($structure): array
$structure['table'] = ['title', 'pool', 'billing_cycle_id', 'gateway_id', 'speed', 'speed_type', 'bundle', 'bundle_type', 'amount', 'featured', 'ordering', 'published'];
$structure['form'] = [
['label' => 'Title', 'class' => 'col-span-full', 'fields' => ['title', 'slug']],
['label' => 'Bundle', 'class' => 'col-span-6', 'fields' => ['bundle', 'bundle_type']],
['label' => 'Speed', 'class' => 'col-span-6', 'fields' => ['speed', 'speed_type']],
['label' => 'Package', 'class' => 'col-span-6', 'fields' => ['pool', 'billing_cycle_id', 'gateway_id', 'amount', 'default']],
['label' => 'Package', 'class' => 'col-span-6', 'fields' => ['published', 'featured', 'is_unlimited', 'is_hidden', 'ordering']],
['label' => 'Bundle', 'class' => 'col-span-full md:col-span-6', 'fields' => ['bundle', 'bundle_type']],
['label' => 'Speed', 'class' => 'col-span-full md:col-span-6', 'fields' => ['speed', 'speed_type']],
['label' => 'Package', 'class' => 'col-span-full md:col-span-6', 'fields' => ['pool', 'billing_cycle_id', 'gateway_id', 'amount', 'default']],
['label' => 'Package', 'class' => 'col-span-full md:col-span-6', 'fields' => ['published', 'featured', 'is_unlimited', 'is_hidden', 'ordering']],
['label' => 'Description', 'class' => 'col-span-full', 'fields' => ['description']],
];
$structure['filter'] = ['title', 'billing_cycle_id', 'gateway_id', 'published'];
Expand Down
6 changes: 3 additions & 3 deletions Entities/PackageCharge.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ public function structure($structure): array
$structure['table'] = ['title', 'slug', 'package_id', 'ledger_id', 'price', 'quantity', 'published'];
$structure['form'] = [
['label' => 'Title', 'class' => 'col-span-full', 'fields' => ['title', 'slug']],
['label' => 'Package', 'class' => 'col-span-6', 'fields' => ['package_id', 'ledger_id']],
['label' => 'Price', 'class' => 'col-span-6', 'fields' => ['price', 'quantity']],
['label' => 'Setting', 'class' => 'col-span-6', 'fields' => ['published']],
['label' => 'Package', 'class' => 'col-span-full md:col-span-6', 'fields' => ['package_id', 'ledger_id']],
['label' => 'Price', 'class' => 'col-span-full md:col-span-6', 'fields' => ['price', 'quantity']],
['label' => 'Setting', 'class' => 'col-span-full md:col-span-6', 'fields' => ['published']],
['label' => 'Description', 'class' => 'col-span-full', 'fields' => ['description']],
];
$structure['filter'] = ['title', 'package_id', 'ledger_id', 'published'];
Expand Down
4 changes: 2 additions & 2 deletions Entities/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ public function structure($structure): array
$structure['table'] = ['title', 'subscription_id', 'invoice_id', 'is_paid', 'completed', 'successful'];
$structure['form'] = [
['label' => 'Title', 'class' => 'col-span-full', 'fields' => ['title']],
['label' => 'Payment', 'class' => 'col-span-6', 'fields' => ['subscription_id', 'invoice_id']],
['label' => 'Setting', 'class' => 'col-span-6', 'fields' => ['is_paid', 'completed', 'successful']],
['label' => 'Payment', 'class' => 'col-span-full md:col-span-6', 'fields' => ['subscription_id', 'invoice_id']],
['label' => 'Setting', 'class' => 'col-span-full md:col-span-6', 'fields' => ['is_paid', 'completed', 'successful']],
['label' => 'Description', 'class' => 'col-span-full', 'fields' => ['description']],
];
$structure['filter'] = ['title', 'subscription_id', 'invoice_id', 'successful'];
Expand Down
6 changes: 3 additions & 3 deletions Entities/PaymentCharge.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ public function structure($structure): array
$structure['table'] = ['title', 'payment_id', 'ledger_id', 'price', 'published'];
$structure['form'] = [
['label' => 'Title', 'class' => 'col-span-full', 'fields' => ['title', 'slug']],
['label' => 'Payment Charge', 'class' => 'col-span-6', 'fields' => ['payment_id', 'ledger_id']],
['label' => 'Amount', 'class' => 'col-span-6', 'fields' => ['price', 'quantity']],
['label' => 'Setting', 'class' => 'col-span-6', 'fields' => ['published']],
['label' => 'Payment Charge', 'class' => 'col-span-full md:col-span-6', 'fields' => ['payment_id', 'ledger_id']],
['label' => 'Amount', 'class' => 'col-span-full md:col-span-6', 'fields' => ['price', 'quantity']],
['label' => 'Setting', 'class' => 'col-span-full md:col-span-6ull md:col-span-6', 'fields' => ['published']],
];
$structure['filter'] = ['title', 'payment_id', 'ledger_id'];

Expand Down
4 changes: 2 additions & 2 deletions Entities/SubscriberLogin.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ public function structure($structure): array
$structure['table'] = ['mac', 'ip', 'username', 'link_login', 'link_orig', 'error', 'mac_esc'];
$structure['form'] = [
['label' => 'Mac', 'class' => 'col-span-full', 'fields' => ['mac']],
['label' => 'Main', 'class' => 'col-span-6', 'fields' => ['ip', 'username', 'link_login', 'link_orig', 'error', 'mac_esc']],
['label' => 'Main', 'class' => 'col-span-6', 'fields' => ['chap_id', 'chap_challenge', 'link_login_id', 'link_orig_esc']],
['label' => 'Main', 'class' => 'col-span-full md:col-span-6', 'fields' => ['ip', 'username', 'link_login', 'link_orig', 'error', 'mac_esc']],
['label' => 'Main', 'class' => 'col-span-full md:col-span-6ull md:col-span-6', 'fields' => ['chap_id', 'chap_challenge', 'link_login_id', 'link_orig_esc']],
];
$structure['filter'] = ['mac', 'ip', 'username'];

Expand Down

0 comments on commit dd46b67

Please sign in to comment.