oxpi-nglib 1.0.45 → 1.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/cadastros/funcionarios/funcionario-form/funcionario-form.component.mjs +14 -3
- package/fesm2015/oxpi-nglib.mjs +13 -2
- package/fesm2015/oxpi-nglib.mjs.map +1 -1
- package/fesm2020/oxpi-nglib.mjs +13 -2
- package/fesm2020/oxpi-nglib.mjs.map +1 -1
- package/lib/cadastros/funcionarios/funcionario-form/funcionario-form.component.d.ts +5 -1
- package/package.json +1 -1
|
@@ -12,6 +12,14 @@ export class FuncionarioFormComponent {
|
|
|
12
12
|
this.ws = ws;
|
|
13
13
|
this.isBusy = false;
|
|
14
14
|
this.cargos = [];
|
|
15
|
+
this.exibeAtribuicoes = false;
|
|
16
|
+
}
|
|
17
|
+
get model() {
|
|
18
|
+
return this._model;
|
|
19
|
+
}
|
|
20
|
+
set model(value) {
|
|
21
|
+
this._model = value;
|
|
22
|
+
this.exibeAtribuicoes = value?.cargoId === 2;
|
|
15
23
|
}
|
|
16
24
|
ngOnInit() {
|
|
17
25
|
this.getCargos();
|
|
@@ -27,13 +35,16 @@ export class FuncionarioFormComponent {
|
|
|
27
35
|
this.isBusy = false;
|
|
28
36
|
});
|
|
29
37
|
}
|
|
38
|
+
cargoChanged(ev) {
|
|
39
|
+
this.exibeAtribuicoes = ev.value === 2;
|
|
40
|
+
}
|
|
30
41
|
}
|
|
31
42
|
FuncionarioFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionarioFormComponent, deps: [{ token: i1.CommonWebService }], target: i0.ɵɵFactoryTarget.Component });
|
|
32
|
-
FuncionarioFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: FuncionarioFormComponent, selector: "ox-funcionario-form", inputs: { model: "model" }, ngImport: i0, template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"form-group\" *ngIf=\"model\">\n <label for=\"nome\">Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" required class=\"form-control input-300\" tabindex=\"2\">\n</div>\n<div class=\"form-group\" *ngIf=\"model\">\n <label for=\"cargo\">Cargo</label>\n <mat-select id=\"cargo\" [(value)]=\"model.cargoId\" tabindex=\"2\"
|
|
43
|
+
FuncionarioFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: FuncionarioFormComponent, selector: "ox-funcionario-form", inputs: { model: "model" }, ngImport: i0, template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"form-group\" *ngIf=\"model\">\n <label for=\"nome\">Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" required class=\"form-control input-300\" tabindex=\"2\">\n</div>\n<div class=\"form-group\" *ngIf=\"model\">\n <label for=\"cargo\">Cargo</label>\n <mat-select id=\"cargo\" (selectionChange)=\"cargoChanged($event)\" [(value)]=\"model.cargoId\" tabindex=\"2\"\n class=\"form-control input-300\" color=\"primary\">\n <mat-option *ngFor=\"let m of cargos\" [value]=\"m.id\">\n {{m.nome}}\n </mat-option>\n </mat-select>\n</div>\n<div class=\"form-group\" *ngIf=\"model\">\n <label for=\"nome\">Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" required class=\"form-control input-300\" tabindex=\"2\">\n</div>\n<div class=\"vbox margin-top-16\" *ngIf=\"model && exibeAtribuicoes\">\n <label>Atribui\u00E7\u00F5es</label>\n <div class=\"vbox gap-8\">\n <mat-slide-toggle [(ngModel)]=\"model.atribuicaoConferenciaCheckout\" tabindex=-1>Confer\u00EAncia Checkout\n </mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.atribuicaoLimpeza\" tabindex=-1>Limpeza</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.atribuicaoLiberacaoLimpeza\" tabindex=-1>Libera\u00E7\u00E3o de Limpeza</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.atribuicaoRevisao\" tabindex=-1>Revis\u00E3o</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.atribuicaoFinalizaPedido\" tabindex=-1>Finaliza Pedido</mat-slide-toggle>\n </div>\n\n <div class=\"form-group margin-top-8\">\n <label for=\"senha\">Senha (opcional)</label>\n <input id=\"senha\" [(ngModel)]=\"model.senha\" class=\"form-control input-300\" tabindex=\"3\">\n </div>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i6.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }, { kind: "component", type: i7.BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }] });
|
|
33
44
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionarioFormComponent, decorators: [{
|
|
34
45
|
type: Component,
|
|
35
|
-
args: [{ selector: 'ox-funcionario-form', template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"form-group\" *ngIf=\"model\">\n <label for=\"nome\">Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" required class=\"form-control input-300\" tabindex=\"2\">\n</div>\n<div class=\"form-group\" *ngIf=\"model\">\n <label for=\"cargo\">Cargo</label>\n <mat-select id=\"cargo\" [(value)]=\"model.cargoId\" tabindex=\"2\"
|
|
46
|
+
args: [{ selector: 'ox-funcionario-form', template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"form-group\" *ngIf=\"model\">\n <label for=\"nome\">Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" required class=\"form-control input-300\" tabindex=\"2\">\n</div>\n<div class=\"form-group\" *ngIf=\"model\">\n <label for=\"cargo\">Cargo</label>\n <mat-select id=\"cargo\" (selectionChange)=\"cargoChanged($event)\" [(value)]=\"model.cargoId\" tabindex=\"2\"\n class=\"form-control input-300\" color=\"primary\">\n <mat-option *ngFor=\"let m of cargos\" [value]=\"m.id\">\n {{m.nome}}\n </mat-option>\n </mat-select>\n</div>\n<div class=\"form-group\" *ngIf=\"model\">\n <label for=\"nome\">Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" required class=\"form-control input-300\" tabindex=\"2\">\n</div>\n<div class=\"vbox margin-top-16\" *ngIf=\"model && exibeAtribuicoes\">\n <label>Atribui\u00E7\u00F5es</label>\n <div class=\"vbox gap-8\">\n <mat-slide-toggle [(ngModel)]=\"model.atribuicaoConferenciaCheckout\" tabindex=-1>Confer\u00EAncia Checkout\n </mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.atribuicaoLimpeza\" tabindex=-1>Limpeza</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.atribuicaoLiberacaoLimpeza\" tabindex=-1>Libera\u00E7\u00E3o de Limpeza</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.atribuicaoRevisao\" tabindex=-1>Revis\u00E3o</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.atribuicaoFinalizaPedido\" tabindex=-1>Finaliza Pedido</mat-slide-toggle>\n </div>\n\n <div class=\"form-group margin-top-8\">\n <label for=\"senha\">Senha (opcional)</label>\n <input id=\"senha\" [(ngModel)]=\"model.senha\" class=\"form-control input-300\" tabindex=\"3\">\n </div>\n</div>" }]
|
|
36
47
|
}], ctorParameters: function () { return [{ type: i1.CommonWebService }]; }, propDecorators: { model: [{
|
|
37
48
|
type: Input
|
|
38
49
|
}] } });
|
|
39
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
50
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnVuY2lvbmFyaW8tZm9ybS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9veHBpLW5nbGliL3NyYy9saWIvY2FkYXN0cm9zL2Z1bmNpb25hcmlvcy9mdW5jaW9uYXJpby1mb3JtL2Z1bmNpb25hcmlvLWZvcm0uY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvb3hwaS1uZ2xpYi9zcmMvbGliL2NhZGFzdHJvcy9mdW5jaW9uYXJpb3MvZnVuY2lvbmFyaW8tZm9ybS9mdW5jaW9uYXJpby1mb3JtLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFVLE1BQU0sZUFBZSxDQUFDOzs7Ozs7Ozs7QUFTekQsTUFBTSxPQUFPLHdCQUF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
604
604
|
this.ws = ws;
|
|
605
605
|
this.isBusy = false;
|
|
606
606
|
this.cargos = [];
|
|
607
|
+
this.exibeAtribuicoes = false;
|
|
608
|
+
}
|
|
609
|
+
get model() {
|
|
610
|
+
return this._model;
|
|
611
|
+
}
|
|
612
|
+
set model(value) {
|
|
613
|
+
this._model = value;
|
|
614
|
+
this.exibeAtribuicoes = (value === null || value === void 0 ? void 0 : value.cargoId) === 2;
|
|
607
615
|
}
|
|
608
616
|
ngOnInit() {
|
|
609
617
|
this.getCargos();
|
|
@@ -619,12 +627,15 @@ class FuncionarioFormComponent {
|
|
|
619
627
|
this.isBusy = false;
|
|
620
628
|
});
|
|
621
629
|
}
|
|
630
|
+
cargoChanged(ev) {
|
|
631
|
+
this.exibeAtribuicoes = ev.value === 2;
|
|
632
|
+
}
|
|
622
633
|
}
|
|
623
634
|
FuncionarioFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionarioFormComponent, deps: [{ token: CommonWebService }], target: i0.ɵɵFactoryTarget.Component });
|
|
624
|
-
FuncionarioFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: FuncionarioFormComponent, selector: "ox-funcionario-form", inputs: { model: "model" }, ngImport: i0, template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"form-group\" *ngIf=\"model\">\n <label for=\"nome\">Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" required class=\"form-control input-300\" tabindex=\"2\">\n</div>\n<div class=\"form-group\" *ngIf=\"model\">\n <label for=\"cargo\">Cargo</label>\n <mat-select id=\"cargo\" [(value)]=\"model.cargoId\" tabindex=\"2\"
|
|
635
|
+
FuncionarioFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: FuncionarioFormComponent, selector: "ox-funcionario-form", inputs: { model: "model" }, ngImport: i0, template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"form-group\" *ngIf=\"model\">\n <label for=\"nome\">Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" required class=\"form-control input-300\" tabindex=\"2\">\n</div>\n<div class=\"form-group\" *ngIf=\"model\">\n <label for=\"cargo\">Cargo</label>\n <mat-select id=\"cargo\" (selectionChange)=\"cargoChanged($event)\" [(value)]=\"model.cargoId\" tabindex=\"2\"\n class=\"form-control input-300\" color=\"primary\">\n <mat-option *ngFor=\"let m of cargos\" [value]=\"m.id\">\n {{m.nome}}\n </mat-option>\n </mat-select>\n</div>\n<div class=\"form-group\" *ngIf=\"model\">\n <label for=\"nome\">Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" required class=\"form-control input-300\" tabindex=\"2\">\n</div>\n<div class=\"vbox margin-top-16\" *ngIf=\"model && exibeAtribuicoes\">\n <label>Atribui\u00E7\u00F5es</label>\n <div class=\"vbox gap-8\">\n <mat-slide-toggle [(ngModel)]=\"model.atribuicaoConferenciaCheckout\" tabindex=-1>Confer\u00EAncia Checkout\n </mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.atribuicaoLimpeza\" tabindex=-1>Limpeza</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.atribuicaoLiberacaoLimpeza\" tabindex=-1>Libera\u00E7\u00E3o de Limpeza</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.atribuicaoRevisao\" tabindex=-1>Revis\u00E3o</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.atribuicaoFinalizaPedido\" tabindex=-1>Finaliza Pedido</mat-slide-toggle>\n </div>\n\n <div class=\"form-group margin-top-8\">\n <label for=\"senha\">Senha (opcional)</label>\n <input id=\"senha\" [(ngModel)]=\"model.senha\" class=\"form-control input-300\" tabindex=\"3\">\n </div>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i6$1.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }] });
|
|
625
636
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionarioFormComponent, decorators: [{
|
|
626
637
|
type: Component,
|
|
627
|
-
args: [{ selector: 'ox-funcionario-form', template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"form-group\" *ngIf=\"model\">\n <label for=\"nome\">Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" required class=\"form-control input-300\" tabindex=\"2\">\n</div>\n<div class=\"form-group\" *ngIf=\"model\">\n <label for=\"cargo\">Cargo</label>\n <mat-select id=\"cargo\" [(value)]=\"model.cargoId\" tabindex=\"2\"
|
|
638
|
+
args: [{ selector: 'ox-funcionario-form', template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"form-group\" *ngIf=\"model\">\n <label for=\"nome\">Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" required class=\"form-control input-300\" tabindex=\"2\">\n</div>\n<div class=\"form-group\" *ngIf=\"model\">\n <label for=\"cargo\">Cargo</label>\n <mat-select id=\"cargo\" (selectionChange)=\"cargoChanged($event)\" [(value)]=\"model.cargoId\" tabindex=\"2\"\n class=\"form-control input-300\" color=\"primary\">\n <mat-option *ngFor=\"let m of cargos\" [value]=\"m.id\">\n {{m.nome}}\n </mat-option>\n </mat-select>\n</div>\n<div class=\"form-group\" *ngIf=\"model\">\n <label for=\"nome\">Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" required class=\"form-control input-300\" tabindex=\"2\">\n</div>\n<div class=\"vbox margin-top-16\" *ngIf=\"model && exibeAtribuicoes\">\n <label>Atribui\u00E7\u00F5es</label>\n <div class=\"vbox gap-8\">\n <mat-slide-toggle [(ngModel)]=\"model.atribuicaoConferenciaCheckout\" tabindex=-1>Confer\u00EAncia Checkout\n </mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.atribuicaoLimpeza\" tabindex=-1>Limpeza</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.atribuicaoLiberacaoLimpeza\" tabindex=-1>Libera\u00E7\u00E3o de Limpeza</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.atribuicaoRevisao\" tabindex=-1>Revis\u00E3o</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.atribuicaoFinalizaPedido\" tabindex=-1>Finaliza Pedido</mat-slide-toggle>\n </div>\n\n <div class=\"form-group margin-top-8\">\n <label for=\"senha\">Senha (opcional)</label>\n <input id=\"senha\" [(ngModel)]=\"model.senha\" class=\"form-control input-300\" tabindex=\"3\">\n </div>\n</div>" }]
|
|
628
639
|
}], ctorParameters: function () { return [{ type: CommonWebService }]; }, propDecorators: { model: [{
|
|
629
640
|
type: Input
|
|
630
641
|
}] } });
|