From fd265ae8bb6b4a9d04e6ee48c16ab54d33a7f491 Mon Sep 17 00:00:00 2001 From: Dean Bartok-Thomas Date: Tue, 10 Sep 2019 15:31:16 +0100 Subject: [PATCH] Add ability to manage account lifting periods and payment terms in admin --- src/api/account.js | 8 +- .../accounts/components/AccountDetail.vue | 88 ++++++++++++++++--- src/views/accounts/relationships.vue | 2 +- 3 files changed, 83 insertions(+), 15 deletions(-) diff --git a/src/api/account.js b/src/api/account.js index c972f62d..20bb1426 100644 --- a/src/api/account.js +++ b/src/api/account.js @@ -30,7 +30,9 @@ export function createAccount(data) { 'country': data.address.country, 'postCode': data.address.postCode, 'fuelRestrictions': data.restrictions.fuels, - 'terminalRestrictions': data.restrictions.terminals + 'terminalRestrictions': data.restrictions.terminals, + 'paymentTermsRestrictions': data.restrictions.paymentTerms, + 'liftingPeriodRestrictions': data.restrictions.liftingPeriods } return axios.post(`${apiUrl}/account/create`, dto) @@ -52,7 +54,9 @@ export function updateAccount(data) { 'country': data.address.country, 'postCode': data.address.postCode, 'fuelRestrictions': data.restrictions.fuels, - 'terminalRestrictions': data.restrictions.terminals + 'terminalRestrictions': data.restrictions.terminals, + 'paymentTermsRestrictions': data.restrictions.paymentTerms, + 'liftingPeriodRestrictions': data.restrictions.liftingPeriods } return axios.put(`${apiUrl}/account/${data.id}`, dto) diff --git a/src/views/accounts/components/AccountDetail.vue b/src/views/accounts/components/AccountDetail.vue index dfbd0191..6e696a55 100644 --- a/src/views/accounts/components/AccountDetail.vue +++ b/src/views/accounts/components/AccountDetail.vue @@ -115,6 +115,28 @@ + + + + + + + + + +