fix(ticketTracking): refs #6398 assign ticket workerFk to userFk #1924

Merged
pablone merged 5 commits from 6398-ticketTrackingAsignFix into master 2024-01-10 13:04:28 +00:00
4 changed files with 11 additions and 11 deletions

View File

@ -735,7 +735,7 @@ export default {
},
createStateView: {
state: 'vn-autocomplete[ng-model="$ctrl.stateFk"]',
worker: 'vn-worker-autocomplete[ng-model="$ctrl.workerFk"]',
worker: 'vn-worker-autocomplete[ng-model="$ctrl.userFk"]',
saveStateButton: `button[type=submit]`
},
claimsIndex: {

View File

@ -21,7 +21,7 @@
</vn-autocomplete>
<vn-worker-autocomplete
vn-one
ng-model="$ctrl.workerFk">
ng-model="$ctrl.userFk">
</vn-worker-autocomplete>
</vn-horizontal>
</vn-card>

View File

@ -17,19 +17,19 @@ class Controller extends Section {
set stateFk(value) {
this.params.stateFk = value;
this.isPickerDesignedState = this.getIsPickerDesignedState(value);
this.workerFk = window.localStorage.currentUserWorkerId;
this.userFk = window.localStorage.currentUserWorkerId;
}
get stateFk() {
return this.params.stateFk;
}
set workerFk(value) {
this.params.workerFk = value;
set userFk(value) {
this.params.userFk = value;
}
get workerFk() {
return this.params.workerFk;
get userFk() {
return this.params.userFk;
}
getPickerDesignedState() {

View File

@ -29,11 +29,11 @@ describe('Ticket', () => {
});
});
describe('workerFk setter', () => {
it('should set params.workerFk', () => {
controller.workerFk = 1;
describe('userFk setter', () => {
it('should set params.userFk', () => {
controller.userFk = 1;
expect(controller.params.workerFk).toEqual(1);
expect(controller.params.userFk).toEqual(1);
});
});