diff --git a/.gitignore b/.gitignore index 07f35dc7..3d27b9dd 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,5 @@ Homestead.yaml npm-debug.log yarn-error.log .env +vendor/composer/autoload_static.php package-lock.json diff --git a/database/.gitignore b/database/.gitignore deleted file mode 100644 index 824e6353..00000000 --- a/database/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.sqlite -vendor/composer/autoload_static.php -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; + } + } + } + + + diff --git a/resources/assets/js/pages/settings/admin-supplier.vue b/resources/assets/js/pages/settings/admin-supplier.vue index f43d1aac..56e80737 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 @@