From d9415233f50dcf3349bffc509fbde51eb3d3def6 Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Fri, 14 Apr 2023 15:31:04 +0530 Subject: [PATCH] fix(ux): Add sections for a few Entry types - remove widgets from the QuickEditForm - remove redundant files --- schemas/app/AccountingLedgerEntry.json | 47 ++++-- schemas/app/Party.json | 79 +++++----- schemas/app/inventory/StockLedgerEntry.json | 86 ++++++----- schemas/regional/in/Party.json | 14 +- src/components/Widgets/LinkedEntryWidget.vue | 98 ------------- src/components/Widgets/PartyWidget.vue | 144 ------------------- src/pages/QuickEditForm.vue | 27 +--- src/utils/quickEditWidgets.ts | 18 --- 8 files changed, 137 insertions(+), 376 deletions(-) delete mode 100644 src/components/Widgets/LinkedEntryWidget.vue delete mode 100644 src/components/Widgets/PartyWidget.vue delete mode 100644 src/utils/quickEditWidgets.ts diff --git a/schemas/app/AccountingLedgerEntry.json b/schemas/app/AccountingLedgerEntry.json index 17525ee5..759e9cb0 100644 --- a/schemas/app/AccountingLedgerEntry.json +++ b/schemas/app/AccountingLedgerEntry.json @@ -6,11 +6,28 @@ "isChild": false, "naming": "autoincrement", "fields": [ + { + "label": "Entry No.", + "fieldname": "name", + "fieldtype": "Data", + "required": true, + "readOnly": true, + "section": "Default" + }, { "fieldname": "date", "label": "Date", "fieldtype": "Datetime", - "readOnly": true + "readOnly": true, + "section": "Default" + }, + { + "fieldname": "party", + "label": "Party", + "fieldtype": "Link", + "target": "Party", + "readOnly": true, + "section": "Default" }, { "fieldname": "account", @@ -18,53 +35,53 @@ "fieldtype": "Link", "target": "Account", "required": true, - "readOnly": true - }, - { - "fieldname": "party", - "label": "Party", - "fieldtype": "Link", - "target": "Party", - "readOnly": true + "readOnly": true, + "section": "Default" }, { "fieldname": "debit", "label": "Debit", "fieldtype": "Currency", - "readOnly": true + "readOnly": true, + "section": "Details" }, { "fieldname": "credit", "label": "Credit", "fieldtype": "Currency", - "readOnly": true + "readOnly": true, + "section": "Details" }, { "fieldname": "referenceType", "label": "Ref. Type", "fieldtype": "Data", - "readOnly": true + "readOnly": true, + "section": "Reference" }, { "fieldname": "referenceName", "label": "Ref. Name", "fieldtype": "DynamicLink", "references": "referenceType", - "readOnly": true + "readOnly": true, + "section": "Reference" }, { "fieldname": "reverted", "label": "Reverted", "fieldtype": "Check", "default": false, - "readOnly": true + "readOnly": true, + "section": "Reference" }, { "fieldname": "reverts", "label": "Reverts", "fieldtype": "Link", "target": "AccountingLedgerEntry", - "readOnly": true + "readOnly": true, + "section": "Reference" } ], "quickEditFields": [ diff --git a/schemas/app/Party.json b/schemas/app/Party.json index 93f41983..7f1c4e6e 100644 --- a/schemas/app/Party.json +++ b/schemas/app/Party.json @@ -3,17 +3,19 @@ "label": "Party", "naming": "manual", "fields": [ + { + "fieldname": "image", + "label": "Image", + "fieldtype": "AttachImage", + "section": "Default" + }, { "fieldname": "name", "label": "Name", "fieldtype": "Data", "required": true, - "placeholder": "Full Name" - }, - { - "fieldname": "image", - "label": "Image", - "fieldtype": "AttachImage" + "placeholder": "Full Name", + "section": "Default" }, { "fieldname": "role", @@ -34,20 +36,38 @@ "label": "Customer" } ], - "required": true + "required": true, + "section": "Default" + }, + { + "fieldname": "email", + "label": "Email", + "fieldtype": "Data", + "placeholder": "john@doe.com", + "section": "Contacts" + }, + { + "fieldname": "phone", + "label": "Phone", + "fieldtype": "Data", + "placeholder": "Phone", + "section": "Contacts" + }, + { + "fieldname": "address", + "label": "Address", + "fieldtype": "Link", + "target": "Address", + "create": true, + "section": "Contacts" }, { "fieldname": "defaultAccount", "label": "Default Account", "fieldtype": "Link", "target": "Account", - "create": true - }, - { - "fieldname": "outstandingAmount", - "label": "Outstanding Amount", - "fieldtype": "Currency", - "hidden": true + "create": true, + "section": "Billing" }, { "fieldname": "currency", @@ -55,31 +75,20 @@ "fieldtype": "Link", "target": "Currency", "placeholder": "INR", - "create": true - }, - { - "fieldname": "email", - "label": "Email", - "fieldtype": "Data", - "placeholder": "john@doe.com" - }, - { - "fieldname": "phone", - "label": "Phone", - "fieldtype": "Data", - "placeholder": "Phone" - }, - { - "fieldname": "address", - "label": "Address", - "fieldtype": "Link", - "target": "Address", - "create": true + "create": true, + "section": "Billing" }, { "fieldname": "taxId", "label": "Tax ID", - "fieldtype": "Data" + "fieldtype": "Data", + "section": "Billing" + }, + { + "fieldname": "outstandingAmount", + "label": "Outstanding Amount", + "fieldtype": "Currency", + "hidden": true } ], "quickEditFields": [ diff --git a/schemas/app/inventory/StockLedgerEntry.json b/schemas/app/inventory/StockLedgerEntry.json index c624afc5..2e4c38ac 100644 --- a/schemas/app/inventory/StockLedgerEntry.json +++ b/schemas/app/inventory/StockLedgerEntry.json @@ -6,57 +6,73 @@ "isChild": false, "naming": "autoincrement", "fields": [ + { + "label": "Entry No.", + "fieldname": "name", + "fieldtype": "Data", + "required": true, + "readOnly": true, + "section": "Default" + }, { "fieldname": "date", "label": "Date", "fieldtype": "Datetime", - "readOnly": true - }, - { - "fieldname": "item", - "label": "Item", - "fieldtype": "Link", - "target": "Item", - "readOnly": true - }, - { - "fieldname": "rate", - "label": "Rate", - "fieldtype": "Currency", - "readOnly": true - }, - { - "fieldname": "quantity", - "label": "Quantity", - "fieldtype": "Float", - "readOnly": true + "readOnly": true, + "section": "Default" }, { "fieldname": "location", "label": "Location", "fieldtype": "Link", "target": "Location", - "readOnly": true - }, - { - "fieldname": "referenceName", - "label": "Ref. Name", - "fieldtype": "DynamicLink", - "references": "referenceType", - "readOnly": true - }, - { - "fieldname": "referenceType", - "label": "Ref. Type", - "fieldtype": "Data", - "readOnly": true + "readOnly": true, + "section": "Details" }, { "fieldname": "batch", "label": "Batch", "fieldtype": "Link", "target": "Batch", - "readOnly": true + "readOnly": true, + "section": "Details" + }, + { + "fieldname": "item", + "label": "Item", + "fieldtype": "Link", + "target": "Item", + "readOnly": true, + "section": "Details" + }, + { + "fieldname": "rate", + "label": "Rate", + "fieldtype": "Currency", + "readOnly": true, + "section": "Details" + }, + { + "fieldname": "quantity", + "label": "Quantity", + "fieldtype": "Float", + "readOnly": true, + "section": "Details" + }, + { + "fieldname": "referenceType", + "label": "Ref. Type", + "fieldtype": "Data", + "readOnly": true, + "section": "Reference" + }, + { + "fieldname": "referenceName", + "label": "Ref. Name", + "fieldtype": "DynamicLink", + "references": "referenceType", + "readOnly": true, + "section": "Reference" } ] } diff --git a/schemas/regional/in/Party.json b/schemas/regional/in/Party.json index 1a7c71ff..23209aa6 100644 --- a/schemas/regional/in/Party.json +++ b/schemas/regional/in/Party.json @@ -1,11 +1,6 @@ { "name": "Party", "fields": [ - { - "fieldname": "gstin", - "label": "GSTIN No.", - "fieldtype": "Data" - }, { "fieldname": "gstType", "label": "GST Registration", @@ -25,7 +20,14 @@ "value": "Consumer", "label": "Consumer" } - ] + ], + "section": "Billing" + }, + { + "fieldname": "gstin", + "label": "GSTIN No.", + "fieldtype": "Data", + "section": "Billing" } ], "quickEditFields": [ diff --git a/src/components/Widgets/LinkedEntryWidget.vue b/src/components/Widgets/LinkedEntryWidget.vue deleted file mode 100644 index 8de7d412..00000000 --- a/src/components/Widgets/LinkedEntryWidget.vue +++ /dev/null @@ -1,98 +0,0 @@ - - - diff --git a/src/components/Widgets/PartyWidget.vue b/src/components/Widgets/PartyWidget.vue deleted file mode 100644 index 803a4338..00000000 --- a/src/components/Widgets/PartyWidget.vue +++ /dev/null @@ -1,144 +0,0 @@ - - - diff --git a/src/pages/QuickEditForm.vue b/src/pages/QuickEditForm.vue index 59224f16..a945d4c9 100644 --- a/src/pages/QuickEditForm.vue +++ b/src/pages/QuickEditForm.vue @@ -96,12 +96,8 @@ :fields="fields" :column-ratio="[1.1, 2]" /> - - - -