|
|
|
@ -15,6 +15,20 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
|
|
|
|
|
return $http.get('/compliance/audit/compliance/clientViewFiles/'+ $stateParams.client_moniker);
|
|
|
|
|
}]
|
|
|
|
|
}
|
|
|
|
|
}).state('partner_detail', {
|
|
|
|
|
url: '/{client_moniker}/partner_detail',
|
|
|
|
|
templateUrl: '/static/payment/partner/templates/partner_detail_for_compliance.html',
|
|
|
|
|
controller: 'partnerComplianceCompanyDetail',
|
|
|
|
|
resolve: {
|
|
|
|
|
file: ['$http','$stateParams',function ($http, $stateParams) {
|
|
|
|
|
return $http.get('/compliance/audit/compliance/clientViewFiles/'+ $stateParams.client_moniker);
|
|
|
|
|
}]
|
|
|
|
|
}
|
|
|
|
|
}).state('compliance_for_audit_detail', {
|
|
|
|
|
url: '/partner/complianceForAudit',
|
|
|
|
|
templateUrl: '/static/payment/partner/templates/compliance_auth.html',
|
|
|
|
|
controller: 'partnerComplianceAuditCtrl',
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
@ -38,6 +52,8 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
|
|
|
|
|
|
|
|
|
|
app.controller('partnerComplianceCompanyDetail', ['$rootScope', '$scope', '$http', '$state', '$uibModal', 'commonDialog', 'file', function ($rootScope, $scope, $http, $state, $uibModal, commonDialog, file) {
|
|
|
|
|
$scope.file = file.data || {};
|
|
|
|
|
$scope.partner = $scope.file.client;
|
|
|
|
|
$scope.partner.description = {};
|
|
|
|
|
|
|
|
|
|
$scope.passPartnerComplianceFiles = function () {
|
|
|
|
|
$http.put('/compliance/audit/'+$scope.file.client.client_id+'/pass/complianceFile',{}).then(function (resp) {
|
|
|
|
@ -47,16 +63,38 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.refusePartnerComplianceFiles = function (obj) {
|
|
|
|
|
var partner = angular.copy(obj);
|
|
|
|
|
$uibModal.open({
|
|
|
|
|
templateUrl: '/static/payment/partner/templates/refuse_reason.html',
|
|
|
|
|
controller: 'refusePartnerComplianceFilesCtrl',
|
|
|
|
|
resolve: {
|
|
|
|
|
partner: partner
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
app.controller('refusePartnerComplianceFilesCtrl', ['$scope', '$http', '$state', 'partner', function ($scope, $http, $state, partner) {
|
|
|
|
|
$scope.partner = angular.copy(partner);
|
|
|
|
|
$scope.partner.description = {};
|
|
|
|
|
|
|
|
|
|
$scope.refusePartnerComplianceFiles = function () {
|
|
|
|
|
$http.put('/compliance/audit/'+$scope.file.client.client_id+'/refuse/complianceFile',{}).then(function (resp) {
|
|
|
|
|
$scope.reload();
|
|
|
|
|
var a = $scope.partner.description;
|
|
|
|
|
$http.put('/compliance/audit/'+$scope.partner.client_id+'/refuse/complianceFile',{description:$scope.partner.description}).then(function (resp) {
|
|
|
|
|
$state.reload();
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
// $http.put('/sys/partners/' + $scope.partner.client_moniker + '/upload_payment_logo', {logo_url: $scope.partner.logo_url})
|
|
|
|
|
|
|
|
|
|
app.controller('partnerComplianceAuditCtrl', ['$rootScope','$state','$stateParams', function ($rootScope,$state,$stateParams) {
|
|
|
|
|
if ($state.is('compliance_for_audit_detail')){
|
|
|
|
|
$state.go('partner_detail');
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|