From 43306d8c367593b5d93539b6e6fb4ef648dc1043 Mon Sep 17 00:00:00 2001 From: Mouhamed Lamine Date: Wed, 4 Jul 2018 15:06:44 +0800 Subject: [PATCH 1/2] Uploaded Images made responsive --- database/.gitignore | 1 + .../js/pages/admin/booking/completed.vue | 23 ++- .../js/pages/admin/booking/supplierReport.vue | 15 +- .../admin/booking/uploadChinaBankslip.vue | 2 +- .../js/pages/admin/booking/uploadInvoice.vue | 13 ++ .../js/pages/admin/booking/verification.vue | 21 ++- resources/assets/js/pages/booking/po.vue | 21 ++- .../assets/js/pages/booking/uploadPo.vue | 17 +- vendor/composer/autoload_classmap.php | 136 +++++++++------ vendor/composer/autoload_static.php | 160 +++++++++++------- 10 files changed, 283 insertions(+), 126 deletions(-) diff --git a/database/.gitignore b/database/.gitignore index 9b1dffd9..92a0de32 100644 --- a/database/.gitignore +++ b/database/.gitignore @@ -1 +1,2 @@ *.sqlite +package-lock.json \ No newline at end of file diff --git a/resources/assets/js/pages/admin/booking/completed.vue b/resources/assets/js/pages/admin/booking/completed.vue index e850c9e0..1854f3d7 100644 --- a/resources/assets/js/pages/admin/booking/completed.vue +++ b/resources/assets/js/pages/admin/booking/completed.vue @@ -20,7 +20,7 @@ - + @@ -36,7 +36,7 @@ - + @@ -50,8 +50,10 @@ - + + + @@ -262,7 +264,9 @@ - + + + @@ -273,6 +277,17 @@ .booking-details { font-weight: bold; } + .image { + border: 1px solid #ddd; + border-radius: 4px; + margin-left: auto; + margin-right: auto; + width: 150px; + display: block; + } + .image:hover { + box-shadow: 0 0 2px 1px rgba(0, 140, 186, 0.5); + } \ No newline at end of file + var axios = require('axios'); + var client = axios.create({ + baseURL: 'http://localhost:8000' + }); + + export default { + data() { + return { + tableData: [], + beneficiariesForm : { + company_name : '', + bank_name : '', + acc_no : '', + bank_address : '', + swift : '', + cnap : '', + bank_branch : '', + }, + EditDatadialogVisible: false, + DeleteAdddialogVisible: false, + AddDatadialogVisible: false, + DoneAddDatadialogVisible: false, + DoneUpdateDatadialogVisible: false, + currentEdit : -1, + } + }, + beforeMount(){ + this.UpdateTableData(); + }, + methods: { + CreateBeneficiaries : function(){ + this.AddDatadialogVisible = false; + console.log(this.beneficiariesForm); + client.post('api/setting-beneficiary', this.beneficiariesForm) + .then((response) => { + this.DoneAddDatadialogVisible = true; + this.ClearBeneficiariesForm(); + this.UpdateTableData(); + }) + .catch((error) => { + console.log(error); + this.$message({ + showClose: true, + message: 'Create Fail', + type: 'error', + duration: 10000 + }); + this.ClearBeneficiariesForm(); + }); + }, + UpdateTableData : function(){ + client.get('api/setting-beneficiary', this.beneficiariesForm) + .then((response) => { + this.tableData = response.data; + }) + .catch((error) => { + console.log(error); + this.$message({ + showClose: true, + message: 'Fetch data fail', + type: 'error', + duration: 10000 + }); + }) + }, + DeleteBeneficiaries : function(beneficiaries_id){ + this.DeleteAdddialogVisible = true; + client.delete('api/setting-beneficiary/' + beneficiaries_id) + .then((response) => { + this.UpdateTableData(); + }) + .catch((error) => { + console.log(error); + this.$message({ + showClose: true, + message: 'Delete data fail', + type: 'error', + duration: 10000 + }); + }); + }, + EditBeneficiaries : function(){ + this.EditDatadialogVisible = false; + this.DoneUpdateDatadialogVisible = true; + + client.put('api/setting-beneficiary/' + this.currentEdit, this.beneficiariesForm) + .then((response) => { + this.UpdateTableData(); + }) + .catch((error) => { + console.log(error); + this.$message({ + showClose: true, + message: 'Update Fail', + type: 'error', + duration: 10000 + }); + }); + }, + PopOutAddBeneficiaries : function(){ + this.AddDatadialogVisible = true; + this.ClearBeneficiariesForm(); + }, + PopOutEditBeneficiaries : function(tableDataRow){ + this.EditDatadialogVisible = true; + this.FillupBeneficiariesForm(tableDataRow); + this.currentEdit = this.tableData[tableDataRow].id; + }, + ClearBeneficiariesForm : function(){ + this.beneficiariesForm.company_name = ''; + this.beneficiariesForm.bank_name = ''; + this.beneficiariesForm.acc_no = ''; + this.beneficiariesForm.bank_address = ''; + this.beneficiariesForm.swift = ''; + this.beneficiariesForm.cnap = ''; + this.beneficiariesForm.bank_branch = ''; + }, + FillupBeneficiariesForm : function(tableDataRow){ + this.beneficiariesForm.company_name = this.tableData[tableDataRow].company_name; + this.beneficiariesForm.bank_name = this.tableData[tableDataRow].bank_name; + this.beneficiariesForm.acc_no = this.tableData[tableDataRow].acc_no; + this.beneficiariesForm.bank_address = this.tableData[tableDataRow].bank_address; + this.beneficiariesForm.swift = this.tableData[tableDataRow].swift; + this.beneficiariesForm.cnap = this.tableData[tableDataRow].cnap; + this.beneficiariesForm.bank_branch = this.tableData[tableDataRow].bank_branch; + } + } + } + + \ No newline at end of file diff --git a/resources/assets/js/pages/settings/admin-supplier.vue b/resources/assets/js/pages/settings/admin-supplier.vue index 8b569c9a..a2523b6c 100644 --- a/resources/assets/js/pages/settings/admin-supplier.vue +++ b/resources/assets/js/pages/settings/admin-supplier.vue @@ -15,7 +15,7 @@
- Add New Supplier + Add New Supplier
@@ -101,7 +101,10 @@