From a9c286bd0aeea7f809a941387b7db0a404057602 Mon Sep 17 00:00:00 2001 From: Khafid Prayoga Date: Wed, 3 Sep 2025 09:45:58 +0700 Subject: [PATCH] feat(division): impl division list+entry feat(form): add accessibility improvements to form components - Add labelFor prop to Label component for better form element association - Enhance Combobox with ARIA attributes for better screen reader support - Update form fields with proper IDs and label associations feat(pagination): adjust button width based on page number length Add dynamic button sizing for pagination items to accommodate different digit lengths (1-99, 100-999, 1000+). This improves visual consistency when displaying varying page numbers. feat(modal): add reusable dialog component and refactor division form - Create new Dialog.vue component with configurable size and outside click prevention - Replace inline dialog implementation in division list with new Dialog component - Fix formatting in entry-form.vue feat(data-table): add click handling for action cells Implement handleActionCellClick function to manage click events on action cells, triggering dropdown buttons when clicked outside interactive elements. Add cursor-pointer class and click handler to action cells for better UX. refactor(custom-ui): centralize action event strings in types Replace hardcoded action event strings with constants from types.ts to improve maintainability and reduce potential typos feat(confirmation): add reusable confirmation modal components - Implement base confirmation.vue component with customizable props - Create record-specific record-confirmation.vue for data operations - Add comprehensive README.md documentation for usage - Integrate confirmation flow in division list component refactor(components): move dialog component to base directory and update imports The dialog component was moved from custom-ui/modal to base/modal to better reflect its shared usage across the application. All import paths referencing the old location have been updated accordingly. refactor(select): reorganize imports and adjust conditional formatting - Reorder imports in Select.vue for better organization - Adjust logical operator formatting in SelectContent.vue for consistency --- app/components/app/divison/entry-form.vue | 26 ++-- app/components/flow/division/list.vue | 107 +++++++++++--- .../pub/base/data-table/data-table.vue | 24 ++- app/components/pub/base/modal/dialog.vue | 54 +++++++ .../pub/custom-ui/confirmation/README.md | 137 ++++++++++++++++++ .../custom-ui/confirmation/confirmation.vue | 99 +++++++++++++ .../confirmation/record-confirmation.vue | 131 +++++++++++++++++ .../pub/custom-ui/data/dropdown-action-du.vue | 5 +- .../custom-ui/data/dropdown-action-ducd.vue | 7 +- .../custom-ui/data/dropdown-action-dud.vue | 7 +- .../pub/custom-ui/data/dropdown-action-ud.vue | 5 +- app/components/pub/custom-ui/data/types.ts | 6 + .../pub/custom-ui/form/combobox.vue | 16 +- app/components/pub/custom-ui/form/label.vue | 3 +- .../pub/custom-ui/pagination/pagination.vue | 15 +- app/components/pub/ui/select/Select.vue | 9 +- .../pub/ui/select/SelectContent.vue | 4 +- 17 files changed, 598 insertions(+), 57 deletions(-) create mode 100644 app/components/pub/base/modal/dialog.vue create mode 100644 app/components/pub/custom-ui/confirmation/README.md diff --git a/app/components/app/divison/entry-form.vue b/app/components/app/divison/entry-form.vue index 5b24b345..3008d3c8 100644 --- a/app/components/app/divison/entry-form.vue +++ b/app/components/app/divison/entry-form.vue @@ -54,19 +54,23 @@ function onCancelForm({ resetForm }: { resetForm: () => void }) {