oxpi-nglib 1.0.7 → 1.0.11

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.
Files changed (28) hide show
  1. package/esm2020/lib/cadastros/produtos/produto-add-dialog/produto-add-dialog.component.mjs +20 -16
  2. package/esm2020/lib/cadastros/produtos/produto-composicao/produto-composicao.component.mjs +148 -0
  3. package/esm2020/lib/cadastros/produtos/produto-composicao-add-dialog/produto-composicao-add-dialog.component.mjs +68 -0
  4. package/esm2020/lib/cadastros/produtos/produto-selecao-dialog/produto-selecao-dialog.component.mjs +135 -0
  5. package/esm2020/lib/cadastros/produtos/produtos/produtos.component.mjs +45 -17
  6. package/esm2020/lib/cadastros/produtos-subgrupos/produto-subgrupo-selecao-dialog/produto-subgrupo-selecao-dialog.component.mjs +11 -8
  7. package/esm2020/lib/models/entidades/login-result.mjs +1 -1
  8. package/esm2020/lib/models/entidades/produto-composicao.mjs +9 -0
  9. package/esm2020/lib/oxpi-nglib.module.mjs +12 -3
  10. package/esm2020/lib/providers/auth-data.service.mjs +3 -1
  11. package/esm2020/lib/providers/common-web-service.mjs +21 -1
  12. package/esm2020/public-api.mjs +5 -1
  13. package/fesm2015/oxpi-nglib.mjs +420 -41
  14. package/fesm2015/oxpi-nglib.mjs.map +1 -1
  15. package/fesm2020/oxpi-nglib.mjs +416 -41
  16. package/fesm2020/oxpi-nglib.mjs.map +1 -1
  17. package/lib/cadastros/produtos/produto-composicao/produto-composicao.component.d.ts +29 -0
  18. package/lib/cadastros/produtos/produto-composicao-add-dialog/produto-composicao-add-dialog.component.d.ts +29 -0
  19. package/lib/cadastros/produtos/produto-selecao-dialog/produto-selecao-dialog.component.d.ts +37 -0
  20. package/lib/cadastros/produtos/produtos/produtos.component.d.ts +2 -0
  21. package/lib/models/entidades/login-result.d.ts +2 -0
  22. package/lib/models/entidades/produto-composicao.d.ts +10 -0
  23. package/lib/oxpi-nglib.module.d.ts +13 -10
  24. package/lib/providers/auth-data.service.d.ts +2 -0
  25. package/lib/providers/common-web-service.d.ts +6 -0
  26. package/package.json +1 -1
  27. package/public-api.d.ts +4 -0
  28. package/styles/cadastros-listagens-form.scss +99 -1
@@ -141,12 +141,14 @@ class CommonWebService {
141
141
  this.ESTOQUE_URL = '';
142
142
  this.MEDIA_BASE_URL = '';
143
143
  this.MEDIA_PRODUTO_IMAGEM_URL = '';
144
+ this.PRODUTO_COMPOSICAO_BASE_URL = '';
144
145
  }
145
146
  setToken(token) {
146
147
  this.token = token;
147
148
  }
148
149
  start(rootUrl) {
149
150
  this.ROOT_URL = rootUrl;
151
+ this.PRODUTO_COMPOSICAO_BASE_URL = rootUrl + "ProdutoComposicao/";
150
152
  this.FUNCIONARIO_BASE_URL = rootUrl + "Funcionario/";
151
153
  this.FUNCIONARIO_CARGO_BASE_URL = rootUrl + "FuncionarioCargo/";
152
154
  this.PRODUTO_BASE_URL = rootUrl + "ProdutoFiscal/";
@@ -296,6 +298,24 @@ class CommonWebService {
296
298
  const url = this.ESTOQUE_URL + 'Setor/';
297
299
  return this.http.get(url, this.getHttpOptions()).pipe(map(data => data));
298
300
  }
301
+ getProdutoComposicao(produtoId) {
302
+ const url = this.PRODUTO_COMPOSICAO_BASE_URL;
303
+ const params = new HttpParams()
304
+ .set("produtoId", '' + produtoId);
305
+ return this.http.get(url, this.getHttpOptions(params)).pipe(map(data => data));
306
+ }
307
+ saveProdutoComposicao(s) {
308
+ const url = this.PRODUTO_COMPOSICAO_BASE_URL;
309
+ return this.http.post(url, JSON.stringify(s), this.getHttpOptions()).pipe(map(data => data));
310
+ }
311
+ addProdutoComposicao(p) {
312
+ const url = this.PRODUTO_COMPOSICAO_BASE_URL;
313
+ return this.http.put(url, JSON.stringify(p), this.getHttpOptions()).pipe(map(data => data));
314
+ }
315
+ deleteProdutoComposicao(id) {
316
+ const url = this.PRODUTO_COMPOSICAO_BASE_URL + id;
317
+ return this.http.delete(url, this.getHttpOptions()).pipe(map(data => data));
318
+ }
299
319
  getHttpOptions(parameters) {
300
320
  return {
301
321
  headers: new HttpHeaders({
@@ -981,6 +1001,8 @@ class AuthDataService {
981
1001
  this.userId = 0;
982
1002
  this.email = '';
983
1003
  this.nome = '';
1004
+ this.usaEstoqueOnline = false;
1005
+ this.usaFinancasOnline = false;
984
1006
  }
985
1007
  login(result) {
986
1008
  this.isLoggedIn = true;
@@ -1926,13 +1948,16 @@ class ProdutoSubgrupoSelecaoDialogComponent {
1926
1948
  atualiza() {
1927
1949
  this.isBusy = true;
1928
1950
  this.ws.buscaProdutoSubgrupo(this.setting)
1929
- .subscribe(r => {
1930
- this.isBusy = false;
1931
- this.items = r;
1932
- console.info(r);
1933
- }, err => {
1934
- this.isBusy = false;
1935
- this.notification.showHttpError(err);
1951
+ .subscribe({
1952
+ next: r => {
1953
+ this.isBusy = false;
1954
+ this.items = r;
1955
+ console.info(r);
1956
+ },
1957
+ error: err => {
1958
+ this.isBusy = false;
1959
+ this.notification.showHttpError(err);
1960
+ }
1936
1961
  });
1937
1962
  }
1938
1963
  selectItem(i) {
@@ -2410,26 +2435,30 @@ class ProdutoAddDialogComponent {
2410
2435
  }
2411
2436
  this.isBusy = true;
2412
2437
  this.ws.addProduto(this.model)
2413
- .subscribe(r => {
2414
- this.isBusy = false;
2415
- this.notification.showMsg("Salvo com sucesso.");
2416
- if (this.dialogRef)
2417
- this.dialogRef.close(true);
2418
- }, err => {
2419
- this.isBusy = false;
2420
- this.notification.showMsg(err.error);
2438
+ .subscribe({
2439
+ next: r => {
2440
+ this.isBusy = false;
2441
+ this.notification.showMsg("Salvo com sucesso.");
2442
+ if (this.dialogRef)
2443
+ this.dialogRef.close(true);
2444
+ }, error: err => {
2445
+ this.isBusy = false;
2446
+ this.notification.showMsg(err.error);
2447
+ }
2421
2448
  });
2422
2449
  }
2423
2450
  getNextId() {
2424
2451
  this.isBusy = true;
2425
2452
  this.ws.getNextIdProduto()
2426
- .subscribe(r => {
2427
- this.model.id = r;
2428
- this.model.referencia = '' + r;
2429
- this.isBusy = false;
2430
- }, err => {
2431
- this.isBusy = false;
2432
- this.notification.showMsg(err.error);
2453
+ .subscribe({
2454
+ next: r => {
2455
+ this.model.id = r;
2456
+ this.model.referencia = '' + r;
2457
+ this.isBusy = false;
2458
+ }, error: err => {
2459
+ this.isBusy = false;
2460
+ this.notification.showMsg(err.error);
2461
+ }
2433
2462
  });
2434
2463
  }
2435
2464
  }
@@ -2551,6 +2580,319 @@ class ProdutoSearchSetting extends SearchSetting {
2551
2580
  }
2552
2581
  }
2553
2582
 
2583
+ function validaProdutoComposicao(item, focus) {
2584
+ if (valNumberMin(item.quantidade, 0)) {
2585
+ focus.set('quantidade');
2586
+ return 'Digite uma quantidade válida.';
2587
+ }
2588
+ return null;
2589
+ }
2590
+
2591
+ class ProdutoComposicaoAddDialogComponent {
2592
+ constructor(model, ws, notification, dialogRef, screenHelper) {
2593
+ this.model = model;
2594
+ this.ws = ws;
2595
+ this.notification = notification;
2596
+ this.dialogRef = dialogRef;
2597
+ this.screenHelper = screenHelper;
2598
+ this.isBusy = false;
2599
+ this.focus = new FocusService();
2600
+ this.mobile = this.screenHelper.isMedium;
2601
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
2602
+ }
2603
+ ngOnInit() {
2604
+ }
2605
+ salvar() {
2606
+ if (!this.model)
2607
+ return;
2608
+ const valMsg = validaProdutoComposicao(this.model, this.focus);
2609
+ if (valMsg) {
2610
+ this.notification.showMsgError(valMsg);
2611
+ return;
2612
+ }
2613
+ this.isBusy = true;
2614
+ const onFinished = {
2615
+ next: (r) => {
2616
+ this.isBusy = false;
2617
+ this.notification.showMsg("Salvo com sucesso.");
2618
+ if (this.dialogRef)
2619
+ this.dialogRef.close(true);
2620
+ },
2621
+ error: (err) => {
2622
+ this.isBusy = false;
2623
+ this.notification.showMsg(err.error);
2624
+ }
2625
+ };
2626
+ if (this.model.id === 0) {
2627
+ this.ws.addProdutoComposicao(this.model)
2628
+ .subscribe(onFinished);
2629
+ }
2630
+ else {
2631
+ this.ws.saveProdutoComposicao(this.model)
2632
+ .subscribe(onFinished);
2633
+ }
2634
+ }
2635
+ }
2636
+ ProdutoComposicaoAddDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoComposicaoAddDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: CommonWebService }, { token: NotificationService }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
2637
+ ProdutoComposicaoAddDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoComposicaoAddDialogComponent, selector: "lib-produto-composicao-add-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <span class=\"titulo\">Composi\u00E7\u00E3o do '{{model.produtoNome}}'</span>\n <button mat-icon-button mat-dialog-close>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"dialog-content\">\n <h4>{{model.produtoItemNome}}</h4>\n <div class=\"vbox margin-top-32\">\n <div class=\"form-group\">\n <label>Quantidade</label>\n <input id=\"quantidade\" [(ngModel)]=\"model.quantidade\" class=\"form-control input-120\" maxlength=\"10\" type=\"number\">\n </div>\n </div>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button (click)=\"salvar()\">CONFIRMAR</button>\n</div>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ 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.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }] });
2638
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoComposicaoAddDialogComponent, decorators: [{
2639
+ type: Component,
2640
+ args: [{ selector: 'lib-produto-composicao-add-dialog', template: "<div class=\"ox-header\">\n <span class=\"titulo\">Composi\u00E7\u00E3o do '{{model.produtoNome}}'</span>\n <button mat-icon-button mat-dialog-close>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"dialog-content\">\n <h4>{{model.produtoItemNome}}</h4>\n <div class=\"vbox margin-top-32\">\n <div class=\"form-group\">\n <label>Quantidade</label>\n <input id=\"quantidade\" [(ngModel)]=\"model.quantidade\" class=\"form-control input-120\" maxlength=\"10\" type=\"number\">\n </div>\n </div>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button (click)=\"salvar()\">CONFIRMAR</button>\n</div>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
2641
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
2642
+ type: Inject,
2643
+ args: [MAT_DIALOG_DATA]
2644
+ }] }, { type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialogRef }, { type: ScreenHelperService }]; } });
2645
+
2646
+ class ProdutoSelecaoDialogComponent {
2647
+ constructor(dialogRef, dialog, ws, notification, auth, screenHelper) {
2648
+ this.dialogRef = dialogRef;
2649
+ this.dialog = dialog;
2650
+ this.ws = ws;
2651
+ this.notification = notification;
2652
+ this.screenHelper = screenHelper;
2653
+ this.items = [];
2654
+ this.selectedItem = null;
2655
+ this.isBusy = false;
2656
+ this.setting = new SearchSetting();
2657
+ this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
2658
+ this.nav = new NavegacaoSelecaoDialogUtil(this);
2659
+ this.mobile = this.screenHelper.isMedium;
2660
+ this.allowAdd = auth.permissoes.adminProdutoAdd;
2661
+ this.allowEdit = auth.permissoes.adminProdutoPesquisa;
2662
+ }
2663
+ ngOnInit() {
2664
+ this.atualiza();
2665
+ }
2666
+ atualiza() {
2667
+ this.isBusy = true;
2668
+ this.ws.buscaPaginadaProdutos(this.setting, 1, 50)
2669
+ .subscribe({
2670
+ next: r => {
2671
+ this.isBusy = false;
2672
+ this.items = r.items;
2673
+ console.info(r);
2674
+ },
2675
+ error: err => {
2676
+ this.isBusy = false;
2677
+ this.notification.showHttpError(err);
2678
+ }
2679
+ });
2680
+ }
2681
+ selectItem(i) {
2682
+ if (this.selectedItem === i) {
2683
+ this.dialogRef.close(i);
2684
+ }
2685
+ this.selectedItem = i;
2686
+ }
2687
+ editar() {
2688
+ const item = this.selectedItem;
2689
+ if (!item)
2690
+ return;
2691
+ this.abreCadastro(item);
2692
+ }
2693
+ abreCadastro(item) {
2694
+ let height = undefined;
2695
+ let width = 550 + 'px';
2696
+ if (this.mobile) {
2697
+ width = (window.innerWidth * 0.99) + 'px';
2698
+ height = (window.innerHeight * 0.99) + 'px';
2699
+ }
2700
+ const dialog = this.dialog.open(ProdutoEditDialogComponent, {
2701
+ data: item,
2702
+ width: width,
2703
+ height: height,
2704
+ maxWidth: '100%',
2705
+ panelClass: 'dialog-p0',
2706
+ });
2707
+ dialog.afterClosed().subscribe(result => {
2708
+ if (result !== true)
2709
+ return;
2710
+ this.notification.showMsg("Salvo com sucesso.");
2711
+ this.atualiza();
2712
+ });
2713
+ }
2714
+ novo() {
2715
+ let height = (window.innerHeight * 0.90) + 'px';
2716
+ let width = 550 + 'px';
2717
+ if (this.mobile) {
2718
+ width = (window.innerWidth * 0.99) + 'px';
2719
+ //height = (window.innerHeight * 0.98) + 'px';
2720
+ }
2721
+ const dialog = this.dialog.open(ProdutoAddDialogComponent, {
2722
+ width: width,
2723
+ height: height,
2724
+ maxWidth: '100%',
2725
+ panelClass: 'dialog-p0',
2726
+ });
2727
+ dialog.afterClosed().subscribe(result => {
2728
+ if (result === undefined)
2729
+ return;
2730
+ this.notification.showMsg("Salvo com sucesso.");
2731
+ this.atualiza();
2732
+ });
2733
+ }
2734
+ excluir() {
2735
+ const item = this.selectedItem;
2736
+ if (!item)
2737
+ return;
2738
+ confirmaExclusao(this.dialog, `Deseja prosseguir com a exclusão do produto ${item.nome}?`, () => {
2739
+ this.isBusy = true;
2740
+ this.ws.deleteProduto(item.id)
2741
+ .subscribe({
2742
+ next: r => {
2743
+ this.notification.showMsg("O produto foi excluído com sucesso.");
2744
+ this.items.remove(item);
2745
+ this.selectedItem = null;
2746
+ this.isBusy = false;
2747
+ },
2748
+ error: err => {
2749
+ this.isBusy = false;
2750
+ this.notification.showMsg(err.error);
2751
+ }
2752
+ });
2753
+ });
2754
+ }
2755
+ }
2756
+ ProdutoSelecaoDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSelecaoDialogComponent, deps: [{ token: i3.MatDialogRef }, { token: i3.MatDialog }, { token: CommonWebService }, { token: NotificationService }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
2757
+ ProdutoSelecaoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoSelecaoDialogComponent, selector: "lib-produto-selecao-dialog", ngImport: i0, template: "<div class=\"dialog-header\">\n <h2>Sele\u00E7\u00E3o de Subgrupos</h2>\n </div>\n <div class=\"tool-panel\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input (keydown)=\"nav.onKeyDown($event)\" cdkFocusInitial [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"editar()\" *ngIf=\"selectedItem && allowEdit\">\n <mat-icon aria-label=\"editar\">edit</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"dialog-content\">\n <ox-item-card [nome]=\"i.nome\" (click)=\"selectItem(i)\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"></ox-item-card>\n </div>\n <div class=\"dialog-footer\">\n <button mat-button [disabled]=\"selectedItem == null\" color=\"primary\" [mat-dialog-close]=\"selectedItem\">CONFIRMAR</button>\n <button mat-button [mat-dialog-close]=\"undefined\">VOLTAR</button>\n </div>\n <ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }] });
2758
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSelecaoDialogComponent, decorators: [{
2759
+ type: Component,
2760
+ args: [{ selector: 'lib-produto-selecao-dialog', template: "<div class=\"dialog-header\">\n <h2>Sele\u00E7\u00E3o de Subgrupos</h2>\n </div>\n <div class=\"tool-panel\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input (keydown)=\"nav.onKeyDown($event)\" cdkFocusInitial [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"editar()\" *ngIf=\"selectedItem && allowEdit\">\n <mat-icon aria-label=\"editar\">edit</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"dialog-content\">\n <ox-item-card [nome]=\"i.nome\" (click)=\"selectItem(i)\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"></ox-item-card>\n </div>\n <div class=\"dialog-footer\">\n <button mat-button [disabled]=\"selectedItem == null\" color=\"primary\" [mat-dialog-close]=\"selectedItem\">CONFIRMAR</button>\n <button mat-button [mat-dialog-close]=\"undefined\">VOLTAR</button>\n </div>\n <ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
2761
+ }], ctorParameters: function () { return [{ type: i3.MatDialogRef }, { type: i3.MatDialog }, { type: CommonWebService }, { type: NotificationService }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
2762
+
2763
+ class ProdutoComposicaoComponent {
2764
+ constructor(dialogRef, dialog, produto, ws, notification, screenHelper) {
2765
+ this.dialogRef = dialogRef;
2766
+ this.dialog = dialog;
2767
+ this.produto = produto;
2768
+ this.ws = ws;
2769
+ this.notification = notification;
2770
+ this.screenHelper = screenHelper;
2771
+ this.items = [];
2772
+ this.selectedItem = null;
2773
+ this.isBusy = false;
2774
+ this.mobile = this.screenHelper.isMedium;
2775
+ }
2776
+ ngOnInit() {
2777
+ this.atualiza();
2778
+ }
2779
+ atualiza() {
2780
+ this.isBusy = true;
2781
+ this.ws.getProdutoComposicao(this.produto.id)
2782
+ .subscribe({
2783
+ next: r => {
2784
+ this.isBusy = false;
2785
+ for (const item of r) {
2786
+ item.produtoId = this.produto.id;
2787
+ item.produtoNome = this.produto.nome;
2788
+ }
2789
+ this.items = r;
2790
+ console.info(r);
2791
+ },
2792
+ error: err => {
2793
+ this.isBusy = false;
2794
+ this.notification.showHttpError(err);
2795
+ }
2796
+ });
2797
+ }
2798
+ selectItem(i) {
2799
+ this.selectedItem = i;
2800
+ }
2801
+ novo() {
2802
+ let height = (window.innerHeight * 0.90) + 'px';
2803
+ let width = 550 + 'px';
2804
+ if (this.mobile) {
2805
+ width = (window.innerWidth * 0.99) + 'px';
2806
+ //height = (window.innerHeight * 0.98) + 'px';
2807
+ }
2808
+ const dialog = this.dialog.open(ProdutoSelecaoDialogComponent, {
2809
+ width: width,
2810
+ //height: height,
2811
+ maxWidth: '100%',
2812
+ panelClass: 'dialog-p0',
2813
+ });
2814
+ dialog.afterClosed().subscribe(result => {
2815
+ if (result === undefined)
2816
+ return;
2817
+ const p = result;
2818
+ const composicao = {
2819
+ id: 0,
2820
+ produtoId: this.produto.id,
2821
+ produtoNome: this.produto.nome,
2822
+ produtoItemId: p.id,
2823
+ produtoItemNome: p.nome,
2824
+ quantidade: 1
2825
+ };
2826
+ const dialog2 = this.dialog.open(ProdutoComposicaoAddDialogComponent, {
2827
+ width: width,
2828
+ //height: height,
2829
+ data: composicao,
2830
+ maxWidth: '100%',
2831
+ panelClass: 'dialog-p0',
2832
+ });
2833
+ dialog2.afterClosed().subscribe(result => {
2834
+ if (result === undefined)
2835
+ return;
2836
+ this.notification.showMsg("Salvo com sucesso.");
2837
+ this.atualiza();
2838
+ });
2839
+ });
2840
+ }
2841
+ editar() {
2842
+ if (!this.selectedItem)
2843
+ return;
2844
+ let height = (window.innerHeight * 0.90) + 'px';
2845
+ let width = 550 + 'px';
2846
+ if (this.mobile) {
2847
+ width = (window.innerWidth * 0.99) + 'px';
2848
+ //height = (window.innerHeight * 0.98) + 'px';
2849
+ }
2850
+ const dialog = this.dialog.open(ProdutoSelecaoDialogComponent, {
2851
+ width: width,
2852
+ //height: height,
2853
+ data: this.selectedItem,
2854
+ maxWidth: '100%',
2855
+ panelClass: 'dialog-p0',
2856
+ });
2857
+ dialog.afterClosed().subscribe(result => {
2858
+ if (result === undefined)
2859
+ return;
2860
+ this.notification.showMsg("Salvo com sucesso.");
2861
+ this.atualiza();
2862
+ });
2863
+ }
2864
+ excluir() {
2865
+ const item = this.selectedItem;
2866
+ if (!item)
2867
+ return;
2868
+ confirmaExclusao(this.dialog, `Deseja prosseguir com a exclusão do produto '${item.produtoItemNome}'?`, () => {
2869
+ this.isBusy = true;
2870
+ this.ws.deleteProdutoComposicao(item.id)
2871
+ .subscribe({
2872
+ next: r => {
2873
+ this.notification.showMsg("O produto foi excluído com sucesso.");
2874
+ this.items.remove(item);
2875
+ this.selectedItem = null;
2876
+ this.isBusy = false;
2877
+ },
2878
+ error: err => {
2879
+ this.isBusy = false;
2880
+ this.notification.showMsg(err.error);
2881
+ }
2882
+ });
2883
+ });
2884
+ }
2885
+ }
2886
+ ProdutoComposicaoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoComposicaoComponent, deps: [{ token: i3.MatDialogRef }, { token: i3.MatDialog }, { token: MAT_DIALOG_DATA }, { token: CommonWebService }, { token: NotificationService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
2887
+ ProdutoComposicaoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoComposicaoComponent, selector: "ox-produto-composicao", ngImport: i0, template: "<div class=\"dialog-header\">\n <h2>Composi\u00E7\u00E3o do Produto '{{produto.nome}}'</h2>\n </div>\n <div class=\"tool-panel\">\n <div class=\"tool-section\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\">\n <mat-icon aria-label=\"novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"editar()\" *ngIf=\"selectedItem\">\n <mat-icon aria-label=\"editar\">edit</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem\">\n <mat-icon aria-label=\"editar\">delete</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"dialog-content\">\n <ox-item-card [codigo]=\"i.quantidade\" [nome]=\"i.produtoItemNome\" (click)=\"selectItem(i)\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"></ox-item-card>\n </div>\n <div class=\"dialog-footer\">\n <button mat-button [disabled]=\"selectedItem == undefined\" color=\"primary\" [mat-dialog-close]=\"selectedItem\">CONFIRMAR</button>\n <button mat-button [mat-dialog-close]=\"undefined\">VOLTAR</button>\n </div>\n <ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], 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: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }] });
2888
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoComposicaoComponent, decorators: [{
2889
+ type: Component,
2890
+ args: [{ selector: 'ox-produto-composicao', template: "<div class=\"dialog-header\">\n <h2>Composi\u00E7\u00E3o do Produto '{{produto.nome}}'</h2>\n </div>\n <div class=\"tool-panel\">\n <div class=\"tool-section\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\">\n <mat-icon aria-label=\"novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"editar()\" *ngIf=\"selectedItem\">\n <mat-icon aria-label=\"editar\">edit</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem\">\n <mat-icon aria-label=\"editar\">delete</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"dialog-content\">\n <ox-item-card [codigo]=\"i.quantidade\" [nome]=\"i.produtoItemNome\" (click)=\"selectItem(i)\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"></ox-item-card>\n </div>\n <div class=\"dialog-footer\">\n <button mat-button [disabled]=\"selectedItem == undefined\" color=\"primary\" [mat-dialog-close]=\"selectedItem\">CONFIRMAR</button>\n <button mat-button [mat-dialog-close]=\"undefined\">VOLTAR</button>\n </div>\n <ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
2891
+ }], ctorParameters: function () { return [{ type: i3.MatDialogRef }, { type: i3.MatDialog }, { type: undefined, decorators: [{
2892
+ type: Inject,
2893
+ args: [MAT_DIALOG_DATA]
2894
+ }] }, { type: CommonWebService }, { type: NotificationService }, { type: ScreenHelperService }]; } });
2895
+
2554
2896
  class PaginatorComponent {
2555
2897
  constructor() {
2556
2898
  this.paginaAtualChange = new EventEmitter();
@@ -2643,6 +2985,7 @@ class ProdutosComponent {
2643
2985
  this.allowAdd = auth.permissoes.adminProdutoAdd;
2644
2986
  this.allowExcluir = auth.permissoes.adminProdutoDelete;
2645
2987
  this.mobile = this.screenHelper.isMedium;
2988
+ this.usaEstoqueOnline = auth.usaEstoqueOnline;
2646
2989
  this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
2647
2990
  this.setting.exibeNaoControladoEstoque = true;
2648
2991
  this.setting.exibeImprimiCozinha = true;
@@ -2700,14 +3043,17 @@ class ProdutosComponent {
2700
3043
  confirmaExclusao(this.dialog, `Deseja prosseguir com a exclusão do produto ${item.nome}?`, () => {
2701
3044
  this.isBusy = true;
2702
3045
  this.ws.deleteProduto(item.id)
2703
- .subscribe(r => {
2704
- this.notification.showMsg("O produto foi excluído com sucesso.");
2705
- this.items.remove(item);
2706
- this.selectedItem = null;
2707
- this.isBusy = false;
2708
- }, err => {
2709
- this.isBusy = false;
2710
- this.notification.showMsg(err.error);
3046
+ .subscribe({
3047
+ next: r => {
3048
+ this.notification.showMsg("O produto foi excluído com sucesso.");
3049
+ this.items.remove(item);
3050
+ this.selectedItem = null;
3051
+ this.isBusy = false;
3052
+ },
3053
+ error: err => {
3054
+ this.isBusy = false;
3055
+ this.notification.showMsg(err.error);
3056
+ }
2711
3057
  });
2712
3058
  });
2713
3059
  }
@@ -2762,12 +3108,15 @@ class ProdutosComponent {
2762
3108
  }
2763
3109
  this.isBusy = true;
2764
3110
  this.ws.saveProduto(this.selectedItem)
2765
- .subscribe(r => {
2766
- this.notification.showMsg("Salvo com sucesso.");
2767
- this.isBusy = false;
2768
- }, err => {
2769
- this.isBusy = false;
2770
- this.notification.showMsg(err.error);
3111
+ .subscribe({
3112
+ next: r => {
3113
+ this.notification.showMsg("Salvo com sucesso.");
3114
+ this.isBusy = false;
3115
+ },
3116
+ error: err => {
3117
+ this.isBusy = false;
3118
+ this.notification.showMsg(err.error);
3119
+ }
2771
3120
  });
2772
3121
  }
2773
3122
  filtros() {
@@ -2796,12 +3145,32 @@ class ProdutosComponent {
2796
3145
  this.atualiza();
2797
3146
  });
2798
3147
  }
3148
+ composicao() {
3149
+ let height = (window.innerHeight * 0.90) + 'px';
3150
+ let width = 550 + 'px';
3151
+ if (this.mobile) {
3152
+ width = (window.innerWidth * 0.99) + 'px';
3153
+ //height = (window.innerHeight * 0.98) + 'px';
3154
+ }
3155
+ const dialog = this.dialog.open(ProdutoComposicaoComponent, {
3156
+ width: width,
3157
+ height: height,
3158
+ maxWidth: '100%',
3159
+ panelClass: 'dialog-p0',
3160
+ });
3161
+ dialog.afterClosed().subscribe(result => {
3162
+ if (result === undefined)
3163
+ return;
3164
+ this.notification.showMsg("Salvo com sucesso.");
3165
+ this.atualiza();
3166
+ });
3167
+ }
2799
3168
  }
2800
3169
  ProdutosComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: i3.MatDialog }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
2801
- ProdutosComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutosComponent, selector: "ox-produtos", ngImport: i0, template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"tool-panel\" *ngIf=\"mobile\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n <button mat-icon-button (click)=\"filtros()\">\n <mat-icon aria-label=\"Filtros\">manage_search</mat-icon>\n </button>\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo Grupo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir Grupo\">delete</mat-icon>\n </button>\n </div>\n </div>\n</div>\n<div class=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [desativado]=\"!i.isAtivo\" [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div> \n <div class=\"hbox\" *ngIf=\"mobile\">\n <ox-paginator (change)=\"trocaPagina()\" [(paginaAtual)]=\"paginaAtual\" [(totalPaginas)]=\"result.totalPaginas\">\n </ox-paginator>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Produtos</h3>\n <div class=\"tool-panel tool-panel-float\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n <button mat-icon-button (click)=\"filtros()\">\n <mat-icon aria-label=\"Filtros\">manage_search</mat-icon>\n </button>\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"listagem-list-container\">\n <h4 *ngIf=\"items.length === 0\" class=\"nenhum-item-msg\">A busca n\u00E3o retornou resultados</h4>\n\n <ox-item-card [desativado]=\"!i.isAtivo\" [cloud]=\"i.enviadoPC\" [codigo]=\"i.id\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n <div class=\"hbox\">\n <ox-paginator (change)=\"trocaPagina()\" [(paginaAtual)]=\"paginaAtual\" [(totalPaginas)]=\"result.totalPaginas\">\n </ox-paginator>\n <div class=\"total-qtd\">Exibindo {{result.inicioQtd}}-{{result.finalQtd}} de {{result.quantidade}}</div>\n \n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um produto no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <ox-produto-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\" [editMode]=\"true\">\n </ox-produto-form>\n </div>\n\n <div class=\"listagem-form-acoes\">\n <button (click)=\"salvar()\" mat-fab color=\"primary\" *ngIf=\"selectedItem\" tabindex=\"20\">\n <mat-icon>save</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>", styles: [":host{height:calc(100% - 48px);display:flex;flex-grow:1;flex-direction:column;background:#F0F0F0}:host{background-color:#fdfdfd}.total-qtd{align-self:center;font-size:small}\n"], 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: PaginatorComponent, selector: "ox-paginator", inputs: ["pageSize", "paginaAtual", "totalPaginas"], outputs: ["paginaAtualChange", "totalPaginasChange", "change"] }, { kind: "component", type: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }, { kind: "component", type: ProdutoFormComponent, selector: "ox-produto-form", inputs: ["editMode", "model"], outputs: ["nextIdClick"] }, { kind: "pipe", type: i6.UpperCasePipe, name: "uppercase" }], animations: [fadeAnimation] });
3170
+ ProdutosComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutosComponent, selector: "ox-produtos", ngImport: i0, template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"tool-panel\" *ngIf=\"mobile\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n <button mat-icon-button (click)=\"filtros()\">\n <mat-icon aria-label=\"Filtros\">manage_search</mat-icon>\n </button>\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo Grupo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir Grupo\">delete</mat-icon>\n </button>\n </div>\n </div>\n</div>\n<div class=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [desativado]=\"!i.isAtivo\" [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div> \n <div class=\"hbox\" *ngIf=\"mobile\">\n <ox-paginator (change)=\"trocaPagina()\" [(paginaAtual)]=\"paginaAtual\" [(totalPaginas)]=\"result.totalPaginas\">\n </ox-paginator>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Produtos</h3>\n <div class=\"tool-panel tool-panel-float\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n <button mat-icon-button (click)=\"filtros()\">\n <mat-icon aria-label=\"Filtros\">manage_search</mat-icon>\n </button>\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"listagem-list-container\">\n <h4 *ngIf=\"items.length === 0\" class=\"nenhum-item-msg\">A busca n\u00E3o retornou resultados</h4>\n\n <ox-item-card [desativado]=\"!i.isAtivo\" [cloud]=\"i.enviadoPC\" [codigo]=\"i.id\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n <div class=\"hbox\">\n <ox-paginator (change)=\"trocaPagina()\" [(paginaAtual)]=\"paginaAtual\" [(totalPaginas)]=\"result.totalPaginas\">\n </ox-paginator>\n <div class=\"total-qtd\">Exibindo {{result.inicioQtd}}-{{result.finalQtd}} de {{result.quantidade}}</div>\n \n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um produto no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <ox-produto-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\" [editMode]=\"true\">\n </ox-produto-form>\n </div>\n\n <div class=\"listagem-form-acoes\">\n <button (click)=\"salvar()\" mat-stroked-button color=\"primary\" *ngIf=\"selectedItem\" tabindex=\"20\">Salvar</button>\n <button (click)=\"composicao()\" mat-stroked-button *ngIf=\"selectedItem && usaEstoqueOnline\" tabindex=\"20\">Composi\u00E7\u00E3o</button>\n </div>\n </div>\n </div>\n</div>", styles: [":host{height:calc(100% - 48px);display:flex;flex-grow:1;flex-direction:column;background:#F0F0F0}:host{background-color:#fdfdfd}.total-qtd{align-self:center;font-size:small}\n"], 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: PaginatorComponent, selector: "ox-paginator", inputs: ["pageSize", "paginaAtual", "totalPaginas"], outputs: ["paginaAtualChange", "totalPaginasChange", "change"] }, { kind: "component", type: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }, { kind: "component", type: ProdutoFormComponent, selector: "ox-produto-form", inputs: ["editMode", "model"], outputs: ["nextIdClick"] }, { kind: "pipe", type: i6.UpperCasePipe, name: "uppercase" }], animations: [fadeAnimation] });
2802
3171
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosComponent, decorators: [{
2803
3172
  type: Component,
2804
- args: [{ selector: 'ox-produtos', animations: [fadeAnimation], template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"tool-panel\" *ngIf=\"mobile\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n <button mat-icon-button (click)=\"filtros()\">\n <mat-icon aria-label=\"Filtros\">manage_search</mat-icon>\n </button>\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo Grupo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir Grupo\">delete</mat-icon>\n </button>\n </div>\n </div>\n</div>\n<div class=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [desativado]=\"!i.isAtivo\" [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div> \n <div class=\"hbox\" *ngIf=\"mobile\">\n <ox-paginator (change)=\"trocaPagina()\" [(paginaAtual)]=\"paginaAtual\" [(totalPaginas)]=\"result.totalPaginas\">\n </ox-paginator>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Produtos</h3>\n <div class=\"tool-panel tool-panel-float\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n <button mat-icon-button (click)=\"filtros()\">\n <mat-icon aria-label=\"Filtros\">manage_search</mat-icon>\n </button>\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"listagem-list-container\">\n <h4 *ngIf=\"items.length === 0\" class=\"nenhum-item-msg\">A busca n\u00E3o retornou resultados</h4>\n\n <ox-item-card [desativado]=\"!i.isAtivo\" [cloud]=\"i.enviadoPC\" [codigo]=\"i.id\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n <div class=\"hbox\">\n <ox-paginator (change)=\"trocaPagina()\" [(paginaAtual)]=\"paginaAtual\" [(totalPaginas)]=\"result.totalPaginas\">\n </ox-paginator>\n <div class=\"total-qtd\">Exibindo {{result.inicioQtd}}-{{result.finalQtd}} de {{result.quantidade}}</div>\n \n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um produto no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <ox-produto-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\" [editMode]=\"true\">\n </ox-produto-form>\n </div>\n\n <div class=\"listagem-form-acoes\">\n <button (click)=\"salvar()\" mat-fab color=\"primary\" *ngIf=\"selectedItem\" tabindex=\"20\">\n <mat-icon>save</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>", styles: [":host{height:calc(100% - 48px);display:flex;flex-grow:1;flex-direction:column;background:#F0F0F0}:host{background-color:#fdfdfd}.total-qtd{align-self:center;font-size:small}\n"] }]
3173
+ args: [{ selector: 'ox-produtos', animations: [fadeAnimation], template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"tool-panel\" *ngIf=\"mobile\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n <button mat-icon-button (click)=\"filtros()\">\n <mat-icon aria-label=\"Filtros\">manage_search</mat-icon>\n </button>\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo Grupo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir Grupo\">delete</mat-icon>\n </button>\n </div>\n </div>\n</div>\n<div class=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [desativado]=\"!i.isAtivo\" [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div> \n <div class=\"hbox\" *ngIf=\"mobile\">\n <ox-paginator (change)=\"trocaPagina()\" [(paginaAtual)]=\"paginaAtual\" [(totalPaginas)]=\"result.totalPaginas\">\n </ox-paginator>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Produtos</h3>\n <div class=\"tool-panel tool-panel-float\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n <button mat-icon-button (click)=\"filtros()\">\n <mat-icon aria-label=\"Filtros\">manage_search</mat-icon>\n </button>\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"listagem-list-container\">\n <h4 *ngIf=\"items.length === 0\" class=\"nenhum-item-msg\">A busca n\u00E3o retornou resultados</h4>\n\n <ox-item-card [desativado]=\"!i.isAtivo\" [cloud]=\"i.enviadoPC\" [codigo]=\"i.id\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n <div class=\"hbox\">\n <ox-paginator (change)=\"trocaPagina()\" [(paginaAtual)]=\"paginaAtual\" [(totalPaginas)]=\"result.totalPaginas\">\n </ox-paginator>\n <div class=\"total-qtd\">Exibindo {{result.inicioQtd}}-{{result.finalQtd}} de {{result.quantidade}}</div>\n \n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um produto no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <ox-produto-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\" [editMode]=\"true\">\n </ox-produto-form>\n </div>\n\n <div class=\"listagem-form-acoes\">\n <button (click)=\"salvar()\" mat-stroked-button color=\"primary\" *ngIf=\"selectedItem\" tabindex=\"20\">Salvar</button>\n <button (click)=\"composicao()\" mat-stroked-button *ngIf=\"selectedItem && usaEstoqueOnline\" tabindex=\"20\">Composi\u00E7\u00E3o</button>\n </div>\n </div>\n </div>\n</div>", styles: [":host{height:calc(100% - 48px);display:flex;flex-grow:1;flex-direction:column;background:#F0F0F0}:host{background-color:#fdfdfd}.total-qtd{align-self:center;font-size:small}\n"] }]
2805
3174
  }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialog }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
2806
3175
 
2807
3176
  class ProdutosCategoriasCardapioComponent {
@@ -3637,7 +4006,10 @@ OxpiNglibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
3637
4006
  ProdutosCategoriasCardapioComponent,
3638
4007
  ProdutoCategoriaCardapioAddDialogComponent,
3639
4008
  ProdutoCategoriaCardapioEditDialogComponent,
3640
- ProdutoCategoriaCardapioSelecaoDialogComponent], imports: [BrowserModule,
4009
+ ProdutoCategoriaCardapioSelecaoDialogComponent,
4010
+ ProdutoComposicaoComponent,
4011
+ ProdutoComposicaoAddDialogComponent,
4012
+ ProdutoSelecaoDialogComponent], imports: [BrowserModule,
3641
4013
  BrowserAnimationsModule,
3642
4014
  FormsModule,
3643
4015
  MatButtonModule,
@@ -3700,7 +4072,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImpor
3700
4072
  ProdutosCategoriasCardapioComponent,
3701
4073
  ProdutoCategoriaCardapioAddDialogComponent,
3702
4074
  ProdutoCategoriaCardapioEditDialogComponent,
3703
- ProdutoCategoriaCardapioSelecaoDialogComponent
4075
+ ProdutoCategoriaCardapioSelecaoDialogComponent,
4076
+ ProdutoComposicaoComponent,
4077
+ ProdutoComposicaoAddDialogComponent,
4078
+ ProdutoSelecaoDialogComponent
3704
4079
  ],
3705
4080
  imports: [
3706
4081
  BrowserModule,
@@ -3924,5 +4299,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImpor
3924
4299
  * Generated bundle index. Do not edit.
3925
4300
  */
3926
4301
 
3927
- export { AlertDialogComponent, AuthDataService, BusyIndicatorComponent, BusyState, CheckButtonComponent, CommonWebService, ConsumoProdutoSearchSetting, DuplicataSearchSetting, ExportFileService, FocusService, FuncionarioAddDialogComponent, FuncionarioEditDialogComponent, FuncionarioFormComponent, FuncionariosComponent, ImageViewerComponent, ItemCardComponent, LazyTrigger, MonthYearPickerComponent, MoverGrupoDialogComponent, NavegacaoSelecaoDialogUtil, NotificationService, NumberParser, NumericPickerComponent, OcupacaoFilterSetting, OcupacaoSearchDateField, OcupacaoSearchSetting, OcupacaoSearchTipoEntrada, Ordem, OxpiNglibModule, PagamentoRecebimentoSearchSetting, PaginatorComponent, PorOcupacaoTipo, Preferences, ProdutoAddDialogComponent, ProdutoBuscaFiltrosDialogComponent, ProdutoCategoriaCardapioAddDialogComponent, ProdutoCategoriaCardapioEditDialogComponent, ProdutoCategoriaCardapioSelecaoDialogComponent, ProdutoEditDialogComponent, ProdutoFormComponent, ProdutoGrupoAddDialogComponent, ProdutoGrupoEditDialogComponent, ProdutoGrupoFormComponent, ProdutoGrupoSelecaoDialogComponent, ProdutoSearchSetting, ProdutoSubgrupoAddDialogComponent, ProdutoSubgrupoEditDialogComponent, ProdutoSubgrupoSelecaoDialogComponent, ProdutosCategoriasCardapioComponent, ProdutosComponent, ProdutosGruposComponent, ProdutosNcmDialogComponent, ProdutosSubgruposComponent, RadioButtonGroupComponent, SafeHtmlPipe, ScreenHelperService, SearchMode, SearchSetting, SuitesIntervencoesSetting, confirmaExclusao, createProduct, fadeAnimation, lateralAnimation, menuLateralAnimation, printHtml, printTxt, selectText, valNumberEmpty, valNumberMin, valTextEmpty, valTextMax, validaProduto, validaProdutoGrupo };
4302
+ export { AlertDialogComponent, AuthDataService, BusyIndicatorComponent, BusyState, CheckButtonComponent, CommonWebService, ConsumoProdutoSearchSetting, DuplicataSearchSetting, ExportFileService, FocusService, FuncionarioAddDialogComponent, FuncionarioEditDialogComponent, FuncionarioFormComponent, FuncionariosComponent, ImageViewerComponent, ItemCardComponent, LazyTrigger, MonthYearPickerComponent, MoverGrupoDialogComponent, NavegacaoSelecaoDialogUtil, NotificationService, NumberParser, NumericPickerComponent, OcupacaoFilterSetting, OcupacaoSearchDateField, OcupacaoSearchSetting, OcupacaoSearchTipoEntrada, Ordem, OxpiNglibModule, PagamentoRecebimentoSearchSetting, PaginatorComponent, PorOcupacaoTipo, Preferences, ProdutoAddDialogComponent, ProdutoBuscaFiltrosDialogComponent, ProdutoCategoriaCardapioAddDialogComponent, ProdutoCategoriaCardapioEditDialogComponent, ProdutoCategoriaCardapioSelecaoDialogComponent, ProdutoComposicaoAddDialogComponent, ProdutoComposicaoComponent, ProdutoEditDialogComponent, ProdutoFormComponent, ProdutoGrupoAddDialogComponent, ProdutoGrupoEditDialogComponent, ProdutoGrupoFormComponent, ProdutoGrupoSelecaoDialogComponent, ProdutoSearchSetting, ProdutoSelecaoDialogComponent, ProdutoSubgrupoAddDialogComponent, ProdutoSubgrupoEditDialogComponent, ProdutoSubgrupoSelecaoDialogComponent, ProdutosCategoriasCardapioComponent, ProdutosComponent, ProdutosGruposComponent, ProdutosNcmDialogComponent, ProdutosSubgruposComponent, RadioButtonGroupComponent, SafeHtmlPipe, ScreenHelperService, SearchMode, SearchSetting, SuitesIntervencoesSetting, confirmaExclusao, createProduct, fadeAnimation, lateralAnimation, menuLateralAnimation, printHtml, printTxt, selectText, valNumberEmpty, valNumberMin, valTextEmpty, valTextMax, validaProduto, validaProdutoComposicao, validaProdutoGrupo };
3928
4303
  //# sourceMappingURL=oxpi-nglib.mjs.map