From c50e0242bf675a08b21b79edb3432f5508965e77 Mon Sep 17 00:00:00 2001 From: achalise Date: Mon, 15 Dec 2025 12:28:51 +0545 Subject: [PATCH] Page design for darta chalani frontend --- src/views/Chalani/Chalani.vue | 9 +- src/views/Chalani/Create.vue | 44 ----- src/views/Chalani/CreateChalani.vue | 245 ++++++++++++++++++++++++++++ src/views/Darta/Create.vue | 170 ++++++++++++------- src/views/Darta/Darta.vue | 3 +- 5 files changed, 364 insertions(+), 107 deletions(-) delete mode 100644 src/views/Chalani/Create.vue create mode 100644 src/views/Chalani/CreateChalani.vue diff --git a/src/views/Chalani/Chalani.vue b/src/views/Chalani/Chalani.vue index d317529..13afb7c 100644 --- a/src/views/Chalani/Chalani.vue +++ b/src/views/Chalani/Chalani.vue @@ -13,18 +13,17 @@ /> - + diff --git a/src/views/Chalani/CreateChalani.vue b/src/views/Chalani/CreateChalani.vue new file mode 100644 index 0000000..4bda12c --- /dev/null +++ b/src/views/Chalani/CreateChalani.vue @@ -0,0 +1,245 @@ + + + diff --git a/src/views/Darta/Create.vue b/src/views/Darta/Create.vue index 683a828..9898fa7 100644 --- a/src/views/Darta/Create.vue +++ b/src/views/Darta/Create.vue @@ -1,19 +1,15 @@ @@ -118,10 +154,7 @@ const DartaTowserStore = createOverlayStore("darta-towser")(); const { show } = storeToRefs(DartaTowserStore); const towser = ref({ - title: [ - { name: "Darta", link: "#" }, - { name: "Create" } - ], + title: [{ name: "Darta", link: "#" }, { name: "Create" }], action: [ { title: "Close", @@ -132,23 +165,29 @@ const towser = ref({ emit: "onSave", }, ], -}) +}); -const departments = ref([{ id: 1, name: 'Administration' }, { id: 2, name: 'HR' }]); -const documentCategories = ref([{ id: 1, name: 'Confidential' }, { id: 2, name: 'Public' }]); +const departments = ref([ + { id: 1, name: "Administration" }, + { id: 2, name: "HR" }, +]); +const documentCategories = ref([ + { id: 1, name: "Confidential" }, + { id: 2, name: "Public" }, +]); const formData = reactive({ department: null, documentCategory: null, - documentNumber: '', - subject: '', - body: '', - recipientName: '', - recipientContact: '', - recipientAddress: '', - issuedDate: '', - dispatchDate: '', - attachments: [] as File[] + documentNumber: "", + subject: "", + body: "", + recipientName: "", + recipientContact: "", + recipientAddress: "", + issuedDate: "", + dispatchDate: "", + attachments: [] as File[], }); const fileInputRef = ref(null); @@ -159,7 +198,7 @@ const onClose = () => { }; const onSave = () => { - submitForm(); + handleSave(); }; const triggerFileInput = () => { @@ -178,13 +217,32 @@ const removeFile = (index: number) => { }; const resetForm = () => { - formData.documentNumber = ''; - formData.subject = ''; + formData.department = null; + formData.documentCategory = null; + formData.documentNumber = ""; + formData.subject = ""; + formData.body = ""; + formData.recipientName = ""; + formData.recipientContact = ""; + formData.recipientAddress = ""; + formData.issuedDate = ""; + formData.dispatchDate = ""; formData.attachments = []; }; -const submitForm = async () => { - console.log("Submitting:", formData); +const handleSave = async () => { + if ( + !formData.department || + !formData.documentCategory || + !formData.documentNumber || + !formData.subject || + !formData.body + ) { + console.error("Please fill in all required fields"); + return; + } + + console.log("Saving:", formData); onClose(); }; - \ No newline at end of file + diff --git a/src/views/Darta/Darta.vue b/src/views/Darta/Darta.vue index 923290d..45850fb 100644 --- a/src/views/Darta/Darta.vue +++ b/src/views/Darta/Darta.vue @@ -16,10 +16,9 @@ - +