Better account index in v2.

This commit is contained in:
James Cole
2024-04-23 07:00:08 +02:00
parent 3cfd178cbd
commit 649f876437
5 changed files with 1988 additions and 1882 deletions

View File

@@ -70,6 +70,9 @@ let index = function () {
}, },
totalPages: 1, totalPages: 1,
page: 1, page: 1,
filters: {
active: 'both',
},
// available columns: // available columns:
// visible is hard coded, enabled is user-configurable. // visible is hard coded, enabled is user-configurable.
@@ -87,7 +90,7 @@ let index = function () {
enabled: true, enabled: true,
}, },
type: { type: {
visible: true, visible: type === 'asset',
enabled: true, enabled: true,
}, },
liability_type: { liability_type: {
@@ -291,6 +294,14 @@ function loadPage() {
let data = comps[comp](); let data = comps[comp]();
Alpine.data(comp, () => data); Alpine.data(comp, () => data);
}); });
Alpine.magic("t", (el) => {
return (name, vars) => {
return i18next.t(name, vars);
};
});
Alpine.start(); Alpine.start();
} }

View File

@@ -31,58 +31,65 @@ function manualChunks(id) {
} }
} }
export default defineConfig({ export default defineConfig(({command, mode, isSsrBuild, isPreview}) => {
base: './',
build: {
rollupOptions: {
output: {
manualChunks,
},
}
},
plugins: [
laravel({
input: [
// css
'src/sass/app.scss',
// dashboard let https = null;
'src/pages/dashboard/dashboard.js', if (command === 'serve') {
https = {
key: fs.readFileSync(`/sites/vm/tls-certificates/wildcard.sd.internal.key`),
cert: fs.readFileSync(`/sites/vm/tls-certificates/wildcard.sd.internal.crt`),
};
}
// accounts return {
'src/pages/accounts/index.js', base: './',
build: {
// administrations rollupOptions: {
'src/pages/administrations/index.js', output: {
'src/pages/administrations/create.js', manualChunks,
'src/pages/administrations/edit.js', },
}
// transactions
'src/pages/transactions/create.js',
'src/pages/transactions/edit.js',
'src/pages/transactions/show.js',
'src/pages/transactions/index.js',
],
publicDirectory: '../../../public',
refresh: true,
}),
manifestSRI(),
],
server: {
usePolling: true,
watch: {
usePolling: true,
}, },
host: '10.0.0.15', plugins: [
// hmr: { laravel({
// protocol: 'wss', input: [
// }, // css
// https: { 'src/sass/app.scss',
// key: fs.readFileSync(`/sites/vm/tls-certificates/wildcard.sd.internal.key`),
// cert: fs.readFileSync(`/sites/vm/tls-certificates/wildcard.sd.internal.crt`), // dashboard
// }, 'src/pages/dashboard/dashboard.js',
},
// accounts
'src/pages/accounts/index.js',
// administrations
'src/pages/administrations/index.js',
'src/pages/administrations/create.js',
'src/pages/administrations/edit.js',
// transactions
'src/pages/transactions/create.js',
'src/pages/transactions/edit.js',
'src/pages/transactions/show.js',
'src/pages/transactions/index.js',
],
publicDirectory: '../../../public',
refresh: true,
}),
//manifestSRI(),
],
server: {
watch: {
usePolling: true,
},
host: '10.0.0.15',
// hmr: {
// protocol: 'wss',
// },
https: https,
},
}
}); });

File diff suppressed because it is too large Load Diff

View File

@@ -25,39 +25,46 @@
declare(strict_types=1); declare(strict_types=1);
return [ return [
'buttons' => 'Buttons', 'buttons' => 'Buttons',
'icon' => 'Icon', 'icon' => 'Icon',
'id' => 'ID', 'id' => 'ID',
'create_date' => 'Created at', 'create_date' => 'Created at',
'update_date' => 'Updated at', 'update_date' => 'Updated at',
'updated_at' => 'Updated at', 'updated_at' => 'Updated at',
'balance_before' => 'Balance before', 'balance_before' => 'Balance before',
'balance_after' => 'Balance after', 'balance_after' => 'Balance after',
'name' => 'Name', 'name' => 'Name',
'role' => 'Role', 'role' => 'Role',
'currentBalance' => 'Current balance', 'currentBalance' => 'Current balance',
'linked_to_rules' => 'Relevant rules', 'linked_to_rules' => 'Relevant rules',
'active' => 'Is active?', 'active' => 'Is active?',
'percentage' => 'pct.', 'percentage' => 'pct.',
'recurring_transaction' => 'Recurring transaction', 'recurring_transaction' => 'Recurring transaction',
'next_due' => 'Next due', 'next_due' => 'Next due',
'transaction_type' => 'Type', 'transaction_type' => 'Type',
'lastActivity' => 'Last activity', 'lastActivity' => 'Last activity',
'balanceDiff' => 'Balance difference', 'balanceDiff' => 'Balance difference',
'other_meta_data' => 'Other meta data', 'other_meta_data' => 'Other meta data',
'invited_at' => 'Invited at', 'invited_at' => 'Invited at',
'expires' => 'Invitation expires', 'expires' => 'Invitation expires',
'invited_by' => 'Invited by', 'invited_by' => 'Invited by',
'invite_link' => 'Invite link', 'invite_link' => 'Invite link',
'account_type' => 'Account type', 'account_type' => 'Account type',
'created_at' => 'Created at', 'created_at' => 'Created at',
'account' => 'Account', 'account' => 'Account',
'external_url' => 'External URL', 'external_url' => 'External URL',
'matchingAmount' => 'Amount', 'matchingAmount' => 'Amount',
'destination' => 'Destination', 'destination' => 'Destination',
'source' => 'Source', 'source' => 'Source',
'next_expected_match' => 'Next expected match', 'next_expected_match' => 'Next expected match',
'automatch' => 'Auto match?', 'automatch' => 'Auto match?',
'drag_and_drop' => 'Drag and drop',
'number' => 'Account number',
'current_balance' => 'Current balance',
'last_activity' => 'Last activity',
'amount_due' => 'Amount due',
'balance_difference' => 'Balance difference',
'menu' => 'Menu',
// Ignore this comment // Ignore this comment
@@ -129,31 +136,31 @@ return [
// Ignore this comment // Ignore this comment
'file_size' => 'File size', 'file_size' => 'File size',
'file_type' => 'File type', 'file_type' => 'File type',
'attached_to' => 'Attached to', 'attached_to' => 'Attached to',
'file_exists' => 'File exists', 'file_exists' => 'File exists',
'spectre_bank' => 'Bank', 'spectre_bank' => 'Bank',
'spectre_last_use' => 'Last login', 'spectre_last_use' => 'Last login',
'spectre_status' => 'Status', 'spectre_status' => 'Status',
'bunq_payment_id' => 'bunq payment ID', 'bunq_payment_id' => 'bunq payment ID',
'repetitions' => 'Repetitions', 'repetitions' => 'Repetitions',
'title' => 'Title', 'title' => 'Title',
'transaction_s' => 'Transaction(s)', 'transaction_s' => 'Transaction(s)',
'field' => 'Field', 'field' => 'Field',
'value' => 'Value', 'value' => 'Value',
'interest' => 'Interest', 'interest' => 'Interest',
'interest_period' => 'Interest period', 'interest_period' => 'Interest period',
'liability_type' => 'Type of liability', 'liability_type' => 'Type of liability',
'liability_direction' => 'Liability in/out', 'liability_direction' => 'Liability in/out',
'end_date' => 'End date', 'end_date' => 'End date',
'payment_info' => 'Payment information', 'payment_info' => 'Payment information',
'expected_info' => 'Next expected transaction', 'expected_info' => 'Next expected transaction',
'start_date' => 'Start date', 'start_date' => 'Start date',
'trigger' => 'Trigger', 'trigger' => 'Trigger',
'response' => 'Response', 'response' => 'Response',
'delivery' => 'Delivery', 'delivery' => 'Delivery',
'url' => 'URL', 'url' => 'URL',
'secret' => 'Secret', 'secret' => 'Secret',
]; ];
// Ignore this comment // Ignore this comment

View File

@@ -56,139 +56,193 @@
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
<td x-show="tableColumns.drag_and_drop.visible && tableColumns.drag_and_drop.enabled">&nbsp;</td> <td x-show="tableColumns.drag_and_drop.visible && tableColumns.drag_and_drop.enabled">
&nbsp;
</td>
<td x-show="tableColumns.active.visible && tableColumns.active.enabled"> <td x-show="tableColumns.active.visible && tableColumns.active.enabled">
<a href="#" x-on:click.prevent="sort('active')">Active?</a> <a href="#" x-on:click.prevent="sort('active')">Active?</a>
<em x-show="sortingColumn === 'active' && sortDirection === 'asc'" class="fa-solid fa-arrow-down-wide-short"></em> <em x-show="sortingColumn === 'active' && sortDirection === 'asc'"
<em x-show="sortingColumn === 'active' && sortDirection === 'desc'" class="fa-solid fa-arrow-up-wide-short"></em> class="fa-solid fa-arrow-down-wide-short"></em>
<em x-show="sortingColumn === 'active' && sortDirection === 'desc'"
class="fa-solid fa-arrow-up-wide-short"></em>
</td> </td>
<td x-show="tableColumns.name.visible && tableColumns.name.enabled"> <td x-show="tableColumns.name.visible && tableColumns.name.enabled">
<a href="#" x-on:click.prevent="sort('name')">Name</a> <a href="#" x-on:click.prevent="sort('name')">Name</a>
<em x-show="sortingColumn === 'name' && sortDirection === 'asc'" class="fa-solid fa-arrow-down-z-a"></em> <em x-show="sortingColumn === 'name' && sortDirection === 'asc'"
<em x-show="sortingColumn === 'name' && sortDirection === 'desc'" class="fa-solid fa-arrow-up-z-a"></em> class="fa-solid fa-arrow-down-z-a"></em>
<em x-show="sortingColumn === 'name' && sortDirection === 'desc'"
class="fa-solid fa-arrow-up-z-a"></em>
</td> </td>
<td x-show="tableColumns.type.visible && tableColumns.type.enabled">Type</td> <td x-show="tableColumns.type.visible && tableColumns.type.enabled">Type</td>
<td x-show="tableColumns.liability_type.visible && tableColumns.liability_type.enabled">Liability type</td> <td x-show="tableColumns.liability_type.visible && tableColumns.liability_type.enabled">
<td x-show="tableColumns.liability_direction.visible && tableColumns.liability_direction.enabled">Liability direction</td> Liability type
<td x-show="tableColumns.liability_interest.visible && tableColumns.liability_interest.enabled">Liability interest</td> </td>
<td x-show="tableColumns.liability_direction.visible && tableColumns.liability_direction.enabled">
Liability direction
</td>
<td x-show="tableColumns.liability_interest.visible && tableColumns.liability_interest.enabled">
Liability interest
</td>
<td x-show="tableColumns.number.visible && tableColumns.number.enabled"> <td x-show="tableColumns.number.visible && tableColumns.number.enabled">
<a href="#" x-on:click.prevent="sort('iban')">Account number</a> <a href="#" x-on:click.prevent="sort('iban')">Account number</a>
<em x-show="sortingColumn === 'iban' && sortDirection === 'asc'" class="fa-solid fa-arrow-down-z-a"></em> <em x-show="sortingColumn === 'iban' && sortDirection === 'asc'"
<em x-show="sortingColumn === 'iban' && sortDirection === 'desc'" class="fa-solid fa-arrow-up-z-a"></em> class="fa-solid fa-arrow-down-z-a"></em>
<em x-show="sortingColumn === 'iban' && sortDirection === 'desc'"
class="fa-solid fa-arrow-up-z-a"></em>
</td> </td>
<td x-show="tableColumns.current_balance.visible && tableColumns.current_balance.enabled"> <td x-show="tableColumns.current_balance.visible && tableColumns.current_balance.enabled">
<a href="#" x-on:click.prevent="sort('balance')">Current balance</a> <a href="#" x-on:click.prevent="sort('balance')">Current balance</a>
<em x-show="sortingColumn === 'balance' && sortDirection === 'asc'" class="fa-solid fa-arrow-down-wide-short"></em> <em x-show="sortingColumn === 'balance' && sortDirection === 'asc'"
<em x-show="sortingColumn === 'balance' && sortDirection === 'desc'" class="fa-solid fa-arrow-up-wide-short"></em> class="fa-solid fa-arrow-down-wide-short"></em>
<em x-show="sortingColumn === 'balance' && sortDirection === 'desc'"
class="fa-solid fa-arrow-up-wide-short"></em>
</td> </td>
<td x-show="tableColumns.amount_due.visible && tableColumns.amount_due.enabled"> <td x-show="tableColumns.amount_due.visible && tableColumns.amount_due.enabled">
<a href="#" x-on:click.prevent="sort('amount_due')">Current balance</a> <a href="#" x-on:click.prevent="sort('amount_due')">Amount due</a>
<em x-show="sortingColumn === 'amount_due' && sortDirection === 'asc'" class="fa-solid fa-arrow-down-wide-short"></em> <em x-show="sortingColumn === 'amount_due' && sortDirection === 'asc'"
<em x-show="sortingColumn === 'amount_due' && sortDirection === 'desc'" class="fa-solid fa-arrow-up-wide-short"></em> class="fa-solid fa-arrow-down-wide-short"></em>
<em x-show="sortingColumn === 'amount_due' && sortDirection === 'desc'"
class="fa-solid fa-arrow-up-wide-short"></em>
</td> </td>
<td x-show="tableColumns.last_activity.visible && tableColumns.last_activity.enabled"> <td x-show="tableColumns.last_activity.visible && tableColumns.last_activity.enabled">
<a href="#" x-on:click.prevent="sort('last_activity')">Last activity</a> <a href="#" x-on:click.prevent="sort('last_activity')">Last activity</a>
<em x-show="sortingColumn === 'last_activity' && sortDirection === 'asc'" class="fa-solid fa-arrow-down-wide-short"></em> <em x-show="sortingColumn === 'last_activity' && sortDirection === 'asc'"
<em x-show="sortingColumn === 'last_activity' && sortDirection === 'desc'" class="fa-solid fa-arrow-up-wide-short"></em> class="fa-solid fa-arrow-down-wide-short"></em>
<em x-show="sortingColumn === 'last_activity' && sortDirection === 'desc'"
class="fa-solid fa-arrow-up-wide-short"></em>
</td> </td>
<td x-show="tableColumns.balance_difference.visible && tableColumns.balance_difference.enabled"> <td x-show="tableColumns.balance_difference.visible && tableColumns.balance_difference.enabled">
<a href="#" x-on:click.prevent="sort('balance_difference')">Balance difference</a> <a href="#" x-on:click.prevent="sort('balance_difference')">Balance
<em x-show="sortingColumn === 'balance_difference' && sortDirection === 'asc'" class="fa-solid fa-arrow-down-wide-short"></em> difference</a>
<em x-show="sortingColumn === 'balance_difference' && sortDirection === 'desc'" class="fa-solid fa-arrow-up-wide-short"></em> <em x-show="sortingColumn === 'balance_difference' && sortDirection === 'asc'"
class="fa-solid fa-arrow-down-wide-short"></em>
<em x-show="sortingColumn === 'balance_difference' && sortDirection === 'desc'"
class="fa-solid fa-arrow-up-wide-short"></em>
</td> </td>
<td x-show="tableColumns.menu.visible && tableColumns.menu.enabled">&nbsp;</td> <td x-show="tableColumns.menu.visible && tableColumns.menu.enabled">&nbsp;</td>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<template x-for="(account, index) in accounts" :key="index"> <template x-for="(account, index) in accounts" :key="index">
<tr> <tr>
<td x-show="tableColumns.drag_and_drop.visible && tableColumns.drag_and_drop.enabled"> <td x-show="tableColumns.drag_and_drop.visible && tableColumns.drag_and_drop.enabled">
<em class="fa-solid fa-bars"></em> <em class="fa-solid fa-bars"></em>
</td> </td>
<td x-show="tableColumns.active.visible && tableColumns.active.enabled"> <td x-show="tableColumns.active.visible && tableColumns.active.enabled">
<template x-if="account.active"> <template x-if="account.active">
<em class="text-success fa-solid fa-check"></em> <em class="text-success fa-solid fa-check"></em>
&nbsp;</template> &nbsp;
<template x-if="!account.active"> </template>
<em class="text-danger fa-solid fa-xmark"></em> <template x-if="!account.active">
&nbsp;</template> <em class="text-danger fa-solid fa-xmark"></em>
</td> &nbsp;
<td x-show="tableColumns.name.visible && tableColumns.name.enabled"> </template>
<!-- render content using a function --> </td>
<span x-html="renderObjectValue('name', account)" x-show="!account.nameEditorVisible"></span> <td x-show="tableColumns.name.visible && tableColumns.name.enabled">
<!-- render content using a function -->
<span x-html="renderObjectValue('name', account)"
x-show="!account.nameEditorVisible"></span>
<!-- edit buttons --> <!-- edit buttons -->
<em x-show="!account.nameEditorVisible" :data-id="account.id" :data-index="index" @click="triggerEdit" data-type="text" class="hidden-edit-button inline-edit-button fa-solid fa-pencil" :data-id="account.id"></em> <em x-show="!account.nameEditorVisible" :data-id="account.id"
:data-index="index" @click="triggerEdit" data-type="text"
class="hidden-edit-button inline-edit-button fa-solid fa-pencil"
:data-id="account.id"></em>
<!-- edit things --> <!-- edit things -->
<div class="row" x-show="account.nameEditorVisible"> <div class="row" x-show="account.nameEditorVisible">
<div class="col-8"> <div class="col-8">
<input :data-index="index" data-field="name" autocomplete="off" type="text" class="form-control form-control-sm" id="input" name="name" :value="account.name" :placeholder="account.value" autofocus> <input :data-index="index" data-field="name" autocomplete="off"
</div> type="text" class="form-control form-control-sm" id="input"
<div class="col-4"> name="name" :value="account.name"
<div class="btn-group btn-group-sm" role="group" aria-label="Options"> :placeholder="account.value" autofocus>
<button :data-index="index" :data-id="account.id" data-field="name" type="button" @click="cancelInlineEdit" class="btn btn-danger"><em class="fa-solid fa-xmark text-white"></em></button> </div>
<button :data-index="index" :data-id="account.id" data-field="name" type="submit" @click="submitInlineEdit" class="btn btn-success"><em class="fa-solid fa-check"></em></button> <div class="col-4">
<div class="btn-group btn-group-sm" role="group"
aria-label="Options">
<button :data-index="index" :data-id="account.id"
data-field="name" type="button"
@click="cancelInlineEdit" class="btn btn-danger"><em
class="fa-solid fa-xmark text-white"></em></button>
<button :data-index="index" :data-id="account.id"
data-field="name" type="submit"
@click="submitInlineEdit" class="btn btn-success"><em
class="fa-solid fa-check"></em></button>
</div>
</div>
</div> </div>
</div> </td>
</div> <td x-show="tableColumns.type.visible && tableColumns.type.enabled">
</td> <template x-if="null === account.role || '' === account.role">
<td x-show="tableColumns.type.visible && tableColumns.type.enabled"> <span><em>{{ __('firefly.no_account_role') }}</em></span>
<template x-if="null === account.role || '' === account.role"> </template>
<span><em>{{ __('firefly.no_account_role') }}</em></span> <template x-if="null !== account.role && '' !== account.role">
</template> <span x-text="accountRole(account.role)"></span>"
<template x-if="null !== account.role && '' !== account.role"> </template>
<span x-text="accountRole(account.role)"></span>" </td>
</template> <td x-show="tableColumns.liability_type.visible && tableColumns.liability_type.enabled"></td>
</td> <td x-show="tableColumns.liability_direction.visible && tableColumns.liability_direction.enabled"></td>
<td x-show="tableColumns.liability_type.visible && tableColumns.liability_type.enabled"></td> <td x-show="tableColumns.liability_interest.visible && tableColumns.liability_interest.enabled"></td>
<td x-show="tableColumns.liability_direction.visible && tableColumns.liability_direction.enabled"></td> <td x-show="tableColumns.number.visible && tableColumns.number.enabled">
<td x-show="tableColumns.liability_interest.visible && tableColumns.liability_interest.enabled"></td> <!-- IBAN and no account nr -->
<td x-show="tableColumns.number.visible && tableColumns.number.enabled"> <template x-if="'' === account.account_number && '' !== account.iban">
<!-- IBAN and no account nr --> <span x-text="account.iban"></span>
<template x-if="'' === account.account_number && '' !== account.iban"> </template>
<span x-text="account.iban"></span> <!-- no IBAN and account nr -->
</template> <template x-if="'' !== account.account_number && '' === account.iban">
<!-- no IBAN and account nr --> <span x-text="account.account_number"></span>
<template x-if="'' !== account.account_number && '' === account.iban"> </template>
<span x-text="account.account_number"></span> <!-- both -->
</template> <template x-if="'' !== account.account_number && '' !== account.iban">
<!-- both -->
<template x-if="'' !== account.account_number && '' !== account.iban">
<span> <span>
<span x-text="account.iban"></span> <span x-text="account.iban"></span>
(<span x-text="account.account_number"></span>) (<span x-text="account.account_number"></span>)
</span> </span>
</template> </template>
</td> </td>
<td x-show="tableColumns.current_balance.visible && tableColumns.current_balance.enabled"> <td x-show="tableColumns.current_balance.visible && tableColumns.current_balance.enabled">
<span x-text="formatMoney(account.current_balance, account.currency_code)"></span> <span
</td> x-text="formatMoney(account.current_balance, account.currency_code)"></span>
<td x-show="tableColumns.amount_due.visible && tableColumns.amount_due.enabled"> </td>
TODO <td x-show="tableColumns.amount_due.visible && tableColumns.amount_due.enabled">
</td> TODO
<td x-show="tableColumns.last_activity.visible && tableColumns.last_activity.enabled"> </td>
<span x-text="account.last_activity"></span> <td x-show="tableColumns.last_activity.visible && tableColumns.last_activity.enabled">
</td> <span x-text="account.last_activity"></span>
<td x-show="tableColumns.balance_difference.visible && tableColumns.balance_difference.enabled"> </td>
<template x-if="null !== account.balance_difference"> <td x-show="tableColumns.balance_difference.visible && tableColumns.balance_difference.enabled">
<span x-text="formatMoney(account.balance_difference, account.currency_code)"></span> <template x-if="null !== account.balance_difference">
</template> <span
</td> x-text="formatMoney(account.balance_difference, account.currency_code)"></span>
<td x-show="tableColumns.menu.visible && tableColumns.menu.enabled"> </template>
<div class="btn-group btn-group-sm"> </td>
<a :href="'./accounts/edit/' + account.id" class="btn btn-sm btn-light"><em class="fa-solid fa-pencil"></em></a> <td x-show="tableColumns.menu.visible && tableColumns.menu.enabled">
<button type="button" class="btn btn-light dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> <div class="btn-group btn-group-sm">
<span class="visually-hidden">{{ __('firefly.toggle_dropdown') }}</span> <a :href="'./accounts/edit/' + account.id" class="btn btn-sm btn-light"><em
</button> class="fa-solid fa-pencil"></em></a>
<ul class="dropdown-menu"> <button type="button"
<li><a class="dropdown-item" :href="'./accounts/show/' + account.id"><em class="fa-solid fa-eye"></em> {{ __('firefly.show') }}</a></li> class="btn btn-light dropdown-toggle dropdown-toggle-split"
<li><a class="dropdown-item" :href="'./accounts/reconcile/' + account.id"><em class="fa-solid fa-calculator"></em> {{ __('firefly.reconcile_selected') }}</a></li> data-bs-toggle="dropdown" aria-expanded="false">
<li><a class="dropdown-item" :href="'./accounts/delete/' + account.id"><em class="fa-solid fa-trash"></em> {{ __('firefly.delete') }}</a></li> <span
</ul> class="visually-hidden">{{ __('firefly.toggle_dropdown') }}</span>
</div> </button>
</td> <ul class="dropdown-menu">
</tr> <li><a class="dropdown-item"
:href="'./accounts/show/' + account.id"><em
class="fa-solid fa-eye"></em> {{ __('firefly.show') }}
</a></li>
<li><a class="dropdown-item"
:href="'./accounts/reconcile/' + account.id"><em
class="fa-solid fa-calculator"></em> {{ __('firefly.reconcile_selected') }}
</a></li>
<li><a class="dropdown-item"
:href="'./accounts/delete/' + account.id"><em
class="fa-solid fa-trash"></em> {{ __('firefly.delete') }}
</a></li>
</ul>
</div>
</td>
</tr>
</template> </template>
</tbody> </tbody>
@@ -205,7 +259,8 @@
</div> </div>
<!-- Internal settings modal --> <!-- Internal settings modal -->
<div class="modal fade" id="internalsModal" tabindex="-1" aria-labelledby="internalsModalLabel" aria-hidden="true"> <div class="modal fade" id="internalsModal" tabindex="-1" aria-labelledby="internalsModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-lg"> <div class="modal-dialog modal-lg">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
@@ -213,16 +268,27 @@
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<h2>Visible columns</h2> <h5>Visible columns</h5>
<template x-for="(column, key) in tableColumns" :key="key"> <div class="mb-2">
<div class="form-check" x-show="column.visible"> <template x-for="(column, key) in tableColumns" :key="key">
<input class="form-check-input" type="checkbox" x-model="column.enabled" @change="saveColumnSettings"> <span x-text="key"></span> <div class="form-check" x-show="column.visible">
</div> <label>
</template> <input class="form-check-input" type="checkbox" x-model="column.enabled"
@change="saveColumnSettings"> <span x-text="$t('list.'+key)"></span>
</label>
</div>
</template>
</div>
<h5>Options</h5>
<div class="mb-2">
<select x-model="filters.active" class="form-control">
<option value="active" label="Active accounts">Active accounts</option>
<option value="inactive" label="Inactive accounts">Inactive accounts</option>
<option value="both" label="Both">Both</option>
</select>
</div>
- Group accounts <br> - Group accounts <br>
- Columns to show<br>
- Show / hide inactive accounts (dropdown: both, active inactive only)<br>
- default sort field<br> - default sort field<br>
- default sort direction<br> - default sort direction<br>
- show info boxes (once they contain info)<br> - show info boxes (once they contain info)<br>
@@ -248,15 +314,17 @@
Take me to the help pages (opens in a new window or tab) Take me to the help pages (opens in a new window or tab)
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-primary" data-bs-dismiss="modal"><em class="fa-solid fa-hat-wizard"></em> Show me around</button> <button type="button" class="btn btn-primary" data-bs-dismiss="modal"><em
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"> <em class="fa-solid fa-right-from-bracket"></em> Take me to the documentation</button> class="fa-solid fa-hat-wizard"></em> Show me around
</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"><em
class="fa-solid fa-right-from-bracket"></em> Take me to the documentation
</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@endsection @endsection
@section('scripts') @section('scripts')
@vite(['src/pages/accounts/index.js']) @vite(['src/pages/accounts/index.js'])