diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java index 3d4597926..4681fe714 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java @@ -53,6 +53,8 @@ public class ClientRegisterInfo { private String contactPhone; @JSONField(name = "contact_email") private String contactEmail; + @JSONField(name = "contact_job") + private String contactJob; private String address; private String suburb; private String postcode; @@ -513,4 +515,12 @@ public class ClientRegisterInfo { public void setRepresentativeJobTitle(String representativeJobTitle) { this.representativeJobTitle = representativeJobTitle; } + + public String getContactJob() { + return contactJob; + } + + public void setContactJob(String contactJob) { + this.contactJob = contactJob; + } } diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index 5ae63e109..722a54cda 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -428,6 +428,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.partner.legal_representative_phone_p = $scope.partner.contact_phone_p; $scope.partner.legal_representative_email = $scope.partner.contact_email; + + $scope.partner.legal_representative_job = $scope.partner.contact_job; } } @@ -1286,6 +1288,58 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.partner.legal_representative_email = $scope.partner.representativeInfo.email; $scope.partner.legal_representative_job = $scope.partner.representativeInfo.job_title; } + + function hasRole() { + var rolenum; + switch (sessionStorage.getItem('role')) { + case "administrator": + rolenum = 1; + break; + case "bduser": + rolenum = 4; + break; + case "salesmanager": + rolenum = 8192; + break; + case "accountant": + rolenum = 8; + break; + case "sitemanager": + rolenum = 128; + break; + case "director": + rolenum = 64; + break; + case "developer": + rolenum = 256; + break; + case "compliance": + rolenum = 2; + break; + case "guest": + rolenum = 2048; + break; + case "orgmanager": + rolenum = 4096; + break; + case "riskmanager": + rolenum = 1024; + break; + default: + break; + } + if ((window.currentUser.role & rolenum) >0) { + return true; + }else { + sessionStorage.removeItem('role'); + return false; + } + } + + if (hasRole()) { + $scope.role = sessionStorage.getItem('role'); + } + var origin_referrer_id = angular.copy($scope.partner.referrer_id); var resetClientPayDescByTpey = function (type) { type = parseInt(type); @@ -1346,6 +1400,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.partner.legal_representative_phone = $scope.partner.contact_phone; $scope.partner.legal_representative_email = $scope.partner.contact_email; + + $scope.partner.legal_representative_job = $scope.partner.contact_job; } } @@ -3061,6 +3117,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.partner.legal_representative_phone_p = $scope.partner.contact_phone_p; $scope.partner.legal_representative_email = $scope.partner.contact_email; + $scope.partner.legal_representative_job = $scope.partner.contact_job; } } diff --git a/src/main/ui/static/payment/partner/partner.js b/src/main/ui/static/payment/partner/partner.js index 6cbee8215..a2dec110d 100644 --- a/src/main/ui/static/payment/partner/partner.js +++ b/src/main/ui/static/payment/partner/partner.js @@ -328,6 +328,18 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo $scope.states = stateMap.configs(); $scope.countries = countryMap.configs(); + if($scope.partner.representativeInfo != null) + { + $scope.partner.registered_address = $scope.partner.representativeInfo.address; + $scope.partner.registered_suburb = $scope.partner.representativeInfo.suburb; + $scope.partner.registered_postcode = $scope.partner.representativeInfo.postcode; + $scope.partner.registered_state = $scope.partner.representativeInfo.state; + $scope.partner.legal_representative_person = $scope.partner.representativeInfo.representative_person; + $scope.partner.legal_representative_phone = $scope.partner.representativeInfo.phone; + $scope.partner.legal_representative_email = $scope.partner.representativeInfo.email; + $scope.partner.legal_representative_job = $scope.partner.representativeInfo.job_title; + } + $scope.uploadLogo = function (file) { if (file != null) { if (file.size > 1 * 1024 * 1024) { @@ -444,6 +456,37 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo } }; + $scope.partner.sameAsContactPerson = false; + $scope.checkboxOnclick = function (){ + $scope.partner.sameAsContactPerson = !($scope.partner.sameAsContactPerson); + if($scope.partner.sameAsContactPerson) + { + $scope.partner.legal_representative_person = $scope.partner.contact_person; + + $scope.partner.legal_representative_phone = $scope.partner.contact_phone; + + $scope.partner.legal_representative_email = $scope.partner.contact_email; + + $scope.partner.legal_representative_job = $scope.partner.contact_job; + } + }; + + $scope.partner.sameAsAddress=false; + $scope.sameAddress = function (){ + $scope.partner.sameAsAddress=!($scope.partner.sameAsAddress); + if($scope.partner.sameAsAddress) + { + $scope.partner.registered_address = $scope.partner.address; + + $scope.partner.registered_suburb = $scope.partner.suburb; + + $scope.partner.registered_postcode = $scope.partner.postcode; + + $scope.partner.registered_state = $scope.partner.state; + } + }; + + $scope.updatePartner = function (form) { if (form.$invalid) { angular.forEach(form, function (item, key) { diff --git a/src/main/ui/static/payment/partner/templates/add_partner.html b/src/main/ui/static/payment/partner/templates/add_partner.html index 6fa16c2c8..739c3975b 100644 --- a/src/main/ui/static/payment/partner/templates/add_partner.html +++ b/src/main/ui/static/payment/partner/templates/add_partner.html @@ -669,6 +669,25 @@ Characters(including symbols and spaces)
+Required + Field
+Less Than 50 + Characters(including symbols and spaces)
+Required Field
Less Than 50 diff --git a/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html b/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html index 91b22a995..fc71f4343 100644 --- a/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html +++ b/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html @@ -574,6 +574,24 @@ Characters(including symbols and spaces)
Required + Field
+Less Than 50 + Characters(including symbols and spaces)
++ +
++ +
++ +
+Required + Field
+Less Than 50 + Characters(including symbols and spaces)
+Required + Field
+Less + Than 50 + Characters(including symbols and spaces)
+Required Field
+Less Than 20 + Characters(including symbols and spaces)
+Required + Field
+Less Than 50 + Characters(including symbols and spaces)
+Required + Field
+Less Than 50 + Characters(including symbols and spaces)
+Less + Than 200 + Characters(including symbols and spaces)
+Required + Field
+Less + Than 50 + Characters(including symbols and spaces)
+Required + Field
+Less + Than 10 + Characters(including symbols and spaces)
+Required + Field
+Required + Field
++ +
+Required + Field
+Less Than 50 + Characters(including symbols and spaces)
+Required + Field
+Less + Than 50 + Characters(including symbols and spaces)
+Required Field
+Less Than 20 + Characters(including symbols and spaces)
+Required + Field
+Less Than 50 + Characters(including symbols and spaces)
+Required + Field
+Less Than 50 + Characters(including symbols and spaces)
+Less + Than 200 + Characters(including symbols and spaces)
+Required + Field
+Less + Than 50 + Characters(including symbols and spaces)
+Required + Field
+Less + Than 10 + Characters(including symbols and spaces)
+Required + Field
+Required + Field
+