oxpi-nglib 1.0.1 → 1.0.2

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 (68) hide show
  1. package/esm2020/lib/cadastros/funcionarios/funcionario-add-dialog/funcionario-add-dialog.component.mjs +3 -3
  2. package/esm2020/lib/cadastros/funcionarios/funcionario-edit-dialog/funcionario-edit-dialog.component.mjs +3 -3
  3. package/esm2020/lib/cadastros/produtos/produto-add-dialog/produto-add-dialog.component.mjs +79 -0
  4. package/esm2020/lib/cadastros/produtos/produto-busca-filtros-dialog/produto-busca-filtros-dialog.component.mjs +56 -0
  5. package/esm2020/lib/cadastros/produtos/produto-edit-dialog/produto-edit-dialog.component.mjs +68 -0
  6. package/esm2020/lib/cadastros/produtos/produto-form/produto-form.component.mjs +343 -0
  7. package/esm2020/lib/cadastros/produtos/produtos/produtos.component.mjs +211 -0
  8. package/esm2020/lib/cadastros/produtos-categoria-cardapio/produto-categoria-cardapio-add-dialog/produto-categoria-cardapio-add-dialog.component.mjs +69 -0
  9. package/esm2020/lib/cadastros/produtos-categoria-cardapio/produto-categoria-cardapio-edit-dialog/produto-categoria-cardapio-edit-dialog.component.mjs +68 -0
  10. package/esm2020/lib/cadastros/produtos-categoria-cardapio/produto-categoria-cardapio-selecao-dialog/produto-categoria-cardapio-selecao-dialog.component.mjs +106 -0
  11. package/esm2020/lib/cadastros/produtos-categoria-cardapio/produtos-categorias-cardapio/produtos-categorias-cardapio.component.mjs +156 -0
  12. package/esm2020/lib/cadastros/produtos-grupos/mover-grupo-dialog/mover-grupo-dialog.component.mjs +65 -0
  13. package/esm2020/lib/cadastros/produtos-grupos/produto-grupo-add-dialog/produto-grupo-add-dialog.component.mjs +69 -0
  14. package/esm2020/lib/cadastros/produtos-grupos/produto-grupo-edit-dialog/produto-grupo-edit-dialog.component.mjs +68 -0
  15. package/esm2020/lib/cadastros/produtos-grupos/produto-grupo-form/produto-grupo-form.component.mjs +18 -0
  16. package/esm2020/lib/cadastros/produtos-grupos/produto-grupo-selecao-dialog/produto-grupo-selecao-dialog.component.mjs +106 -0
  17. package/esm2020/lib/cadastros/produtos-grupos/produtos-grupos/produtos-grupos.component.mjs +179 -0
  18. package/esm2020/lib/cadastros/produtos-ncm-dialog/produtos-ncm-dialog.component.mjs +58 -0
  19. package/esm2020/lib/cadastros/produtos-subgrupos/produto-subgrupo-add-dialog/produto-subgrupo-add-dialog.component.mjs +71 -0
  20. package/esm2020/lib/cadastros/produtos-subgrupos/produto-subgrupo-edit-dialog/produto-subgrupo-edit-dialog.component.mjs +68 -0
  21. package/esm2020/lib/cadastros/produtos-subgrupos/produto-subgrupo-selecao-dialog/produto-subgrupo-selecao-dialog.component.mjs +106 -0
  22. package/esm2020/lib/cadastros/produtos-subgrupos/produtos-subgrupos/produtos-subgrupos.component.mjs +156 -0
  23. package/esm2020/lib/models/entidades/produto-grupo.mjs +9 -0
  24. package/esm2020/lib/models/entidades/produto-ncm.mjs +2 -0
  25. package/esm2020/lib/models/entidades/produto.mjs +106 -0
  26. package/esm2020/lib/models/entidades/setor-estoque.mjs +2 -0
  27. package/esm2020/lib/models/infra/number-parser.mjs +1 -1
  28. package/esm2020/lib/models/infra/selecao-utils.mjs +4 -2
  29. package/esm2020/lib/models/infra/validations.mjs +1 -1
  30. package/esm2020/lib/models/tuple.mjs +2 -0
  31. package/esm2020/lib/oxpi-nglib.module.mjs +69 -5
  32. package/esm2020/lib/providers/common-web-service.mjs +124 -2
  33. package/fesm2015/oxpi-nglib.mjs +2305 -206
  34. package/fesm2015/oxpi-nglib.mjs.map +1 -1
  35. package/fesm2020/oxpi-nglib.mjs +2284 -206
  36. package/fesm2020/oxpi-nglib.mjs.map +1 -1
  37. package/lib/cadastros/produtos/produto-add-dialog/produto-add-dialog.component.d.ts +28 -0
  38. package/lib/cadastros/produtos/produto-busca-filtros-dialog/produto-busca-filtros-dialog.component.d.ts +27 -0
  39. package/lib/cadastros/produtos/produto-edit-dialog/produto-edit-dialog.component.d.ts +27 -0
  40. package/lib/cadastros/produtos/produto-form/produto-form.component.d.ts +78 -0
  41. package/lib/cadastros/produtos/produtos/produtos.component.d.ts +44 -0
  42. package/lib/cadastros/produtos-categoria-cardapio/produto-categoria-cardapio-add-dialog/produto-categoria-cardapio-add-dialog.component.d.ts +27 -0
  43. package/lib/cadastros/produtos-categoria-cardapio/produto-categoria-cardapio-edit-dialog/produto-categoria-cardapio-edit-dialog.component.d.ts +27 -0
  44. package/lib/cadastros/produtos-categoria-cardapio/produto-categoria-cardapio-selecao-dialog/produto-categoria-cardapio-selecao-dialog.component.d.ts +35 -0
  45. package/lib/cadastros/produtos-categoria-cardapio/produtos-categorias-cardapio/produtos-categorias-cardapio.component.d.ts +36 -0
  46. package/lib/cadastros/produtos-grupos/mover-grupo-dialog/mover-grupo-dialog.component.d.ts +21 -0
  47. package/lib/cadastros/produtos-grupos/produto-grupo-add-dialog/produto-grupo-add-dialog.component.d.ts +27 -0
  48. package/lib/cadastros/produtos-grupos/produto-grupo-edit-dialog/produto-grupo-edit-dialog.component.d.ts +27 -0
  49. package/lib/cadastros/produtos-grupos/produto-grupo-form/produto-grupo-form.component.d.ts +10 -0
  50. package/lib/cadastros/produtos-grupos/produto-grupo-selecao-dialog/produto-grupo-selecao-dialog.component.d.ts +35 -0
  51. package/lib/cadastros/produtos-grupos/produtos-grupos/produtos-grupos.component.d.ts +37 -0
  52. package/lib/cadastros/produtos-ncm-dialog/produtos-ncm-dialog.component.d.ts +29 -0
  53. package/lib/cadastros/produtos-subgrupos/produto-subgrupo-add-dialog/produto-subgrupo-add-dialog.component.d.ts +27 -0
  54. package/lib/cadastros/produtos-subgrupos/produto-subgrupo-edit-dialog/produto-subgrupo-edit-dialog.component.d.ts +28 -0
  55. package/lib/cadastros/produtos-subgrupos/produto-subgrupo-selecao-dialog/produto-subgrupo-selecao-dialog.component.d.ts +35 -0
  56. package/lib/cadastros/produtos-subgrupos/produtos-subgrupos/produtos-subgrupos.component.d.ts +36 -0
  57. package/lib/models/entidades/produto-grupo.d.ts +20 -0
  58. package/lib/models/entidades/produto-ncm.d.ts +10 -0
  59. package/lib/models/entidades/produto.d.ts +74 -0
  60. package/lib/models/entidades/setor-estoque.d.ts +7 -0
  61. package/lib/models/infra/number-parser.d.ts +1 -1
  62. package/lib/models/infra/selecao-utils.d.ts +1 -1
  63. package/lib/models/infra/validations.d.ts +3 -3
  64. package/lib/models/tuple.d.ts +4 -0
  65. package/lib/oxpi-nglib.module.d.ts +29 -8
  66. package/lib/providers/common-web-service.d.ts +38 -0
  67. package/package.json +1 -1
  68. package/styles/cadastros-listagens-form.scss +15 -0
@@ -1,25 +1,27 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, EventEmitter, Component, Input, Inject, Output, HostListener, Pipe, NgModule } from '@angular/core';
3
- import * as i3$1 from '@angular/material/dialog';
3
+ import * as i3 from '@angular/material/dialog';
4
4
  import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
5
5
  import * as i1 from '@angular/common/http';
6
- import { HttpHeaders } from '@angular/common/http';
6
+ import { HttpParams, HttpHeaders, HttpEventType } from '@angular/common/http';
7
7
  import { map } from 'rxjs';
8
8
  import * as i1$1 from '@angular/material/snack-bar';
9
- import * as i1$2 from '@angular/common';
10
- import * as i2 from '@angular/material/button';
9
+ import * as i6 from '@angular/common';
10
+ import * as i6$1 from '@angular/material/button';
11
11
  import { MatButtonModule } from '@angular/material/button';
12
- import * as i7 from '@angular/material/icon';
12
+ import * as i7$1 from '@angular/material/icon';
13
13
  import { MatIconModule } from '@angular/material/icon';
14
- import * as i3 from '@angular/forms';
14
+ import * as i7 from '@angular/forms';
15
15
  import { FormsModule } from '@angular/forms';
16
16
  import * as i4 from '@angular/material/select';
17
17
  import { MatSelectModule } from '@angular/material/select';
18
18
  import * as i5 from '@angular/material/core';
19
19
  import { trigger, transition, style, animate } from '@angular/animations';
20
20
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
21
- import * as i1$3 from '@angular/platform-browser';
21
+ import * as i1$2 from '@angular/platform-browser';
22
22
  import { BrowserModule } from '@angular/platform-browser';
23
+ import * as i12 from '@angular/material/autocomplete';
24
+ import { MatAutocompleteModule } from '@angular/material/autocomplete';
23
25
  import * as FileSaver from 'file-saver';
24
26
 
25
27
  function valTextEmpty(v) {
@@ -41,7 +43,7 @@ function valNumberMin(v, min) {
41
43
  return v <= min;
42
44
  }
43
45
 
44
- function valida(item, focus) {
46
+ function valida$2(item, focus) {
45
47
  if (valTextEmpty(item.nome)) {
46
48
  focus.set('nome');
47
49
  return 'Digite um nome válido.';
@@ -126,9 +128,17 @@ class CommonWebService {
126
128
  constructor(http) {
127
129
  this.http = http;
128
130
  this.ROOT_URL = '';
131
+ this.GERENCIAL_URL = '';
129
132
  this.FUNCIONARIO_BASE_URL = '';
130
133
  this.FUNCIONARIO_CARGO_BASE_URL = '';
131
134
  this.token = '';
135
+ this.PRODUTO_BASE_URL = '';
136
+ this.PRODUTO_GRUPO_BASE_URL = '';
137
+ this.PRODUTO_SUBGRUPO_BASE_URL = '';
138
+ this.PRODUTO_CATEGORIA_CARDAPIO_BASE_URL = '';
139
+ this.ESTOQUE_URL = '';
140
+ this.MEDIA_BASE_URL = '';
141
+ this.MEDIA_PRODUTO_IMAGEM_URL = '';
132
142
  }
133
143
  setToken(token) {
134
144
  this.token = token;
@@ -137,6 +147,14 @@ class CommonWebService {
137
147
  this.ROOT_URL = rootUrl;
138
148
  this.FUNCIONARIO_BASE_URL = rootUrl + "Funcionario/";
139
149
  this.FUNCIONARIO_CARGO_BASE_URL = rootUrl + "FuncionarioCargo/";
150
+ this.PRODUTO_BASE_URL = rootUrl + "ProdutoFiscal/";
151
+ this.PRODUTO_GRUPO_BASE_URL = rootUrl + "ProdutoGrupo/";
152
+ this.PRODUTO_SUBGRUPO_BASE_URL = rootUrl + "ProdutoSubgrupo/";
153
+ this.PRODUTO_CATEGORIA_CARDAPIO_BASE_URL = rootUrl + "ProdutoCategoriaCardapio/";
154
+ this.ESTOQUE_URL = rootUrl + 'Estoque/';
155
+ this.GERENCIAL_URL = rootUrl + 'Gerencial/';
156
+ this.MEDIA_BASE_URL = this.GERENCIAL_URL + "Media/";
157
+ this.MEDIA_PRODUTO_IMAGEM_URL = this.GERENCIAL_URL + 'GetProdutoImagem/';
140
158
  }
141
159
  getFuncionarios() {
142
160
  const url = this.FUNCIONARIO_BASE_URL;
@@ -170,6 +188,112 @@ class CommonWebService {
170
188
  const url = this.FUNCIONARIO_BASE_URL + id;
171
189
  return this.http.delete(url, this.getHttpOptions()).pipe(map(data => data));
172
190
  }
191
+ buscaPaginadaProdutos(setting, page, pageSize) {
192
+ const url = this.PRODUTO_BASE_URL + CommonWebService.URL_PART_BUSCA_PAGINADA;
193
+ const p = { setting: setting, page: page, pageSize: pageSize };
194
+ return this.http.post(url, JSON.stringify(p), this.getHttpOptions()).pipe(map(data => data));
195
+ }
196
+ getNextIdProduto() {
197
+ const url = this.PRODUTO_BASE_URL + CommonWebService.URL_PART_NEXT_ID;
198
+ return this.http.get(url, this.getHttpOptions()).pipe(map(data => data));
199
+ }
200
+ saveProduto(s) {
201
+ const url = this.PRODUTO_BASE_URL;
202
+ return this.http.post(url, JSON.stringify(s), this.getHttpOptions()).pipe(map(data => data));
203
+ }
204
+ addProduto(p) {
205
+ const url = this.PRODUTO_BASE_URL;
206
+ return this.http.put(url, JSON.stringify(p), this.getHttpOptions()).pipe(map(data => data));
207
+ }
208
+ deleteProduto(id) {
209
+ const url = this.PRODUTO_BASE_URL + id;
210
+ return this.http.delete(url, this.getHttpOptions()).pipe(map(data => data));
211
+ }
212
+ buscaProdutoGrupo(setting) {
213
+ const url = this.PRODUTO_GRUPO_BASE_URL + CommonWebService.URL_PART_BUSCA;
214
+ return this.http.post(url, JSON.stringify(setting), this.getHttpOptions()).pipe(map(data => data));
215
+ }
216
+ getAllProdutoGrupo() {
217
+ const url = this.PRODUTO_GRUPO_BASE_URL;
218
+ return this.http.get(url, this.getHttpOptions()).pipe(map(data => data));
219
+ }
220
+ getNextIdProdutoGrupo() {
221
+ const url = this.PRODUTO_GRUPO_BASE_URL + CommonWebService.URL_PART_NEXT_ID;
222
+ return this.http.get(url, this.getHttpOptions()).pipe(map(data => data));
223
+ }
224
+ saveProdutoGrupo(s) {
225
+ const url = this.PRODUTO_GRUPO_BASE_URL;
226
+ return this.http.post(url, JSON.stringify(s), this.getHttpOptions()).pipe(map(data => data));
227
+ }
228
+ transfereProdutoGrupo(grupoId, novoGrupoId) {
229
+ const url = this.PRODUTO_BASE_URL + 'AlteraGrupo';
230
+ const p = { oldId: grupoId, newId: novoGrupoId };
231
+ return this.http.post(url, JSON.stringify(p), this.getHttpOptions()).pipe(map(data => data));
232
+ }
233
+ addProdutoGrupo(p) {
234
+ const url = this.PRODUTO_GRUPO_BASE_URL;
235
+ return this.http.put(url, JSON.stringify(p), this.getHttpOptions()).pipe(map(data => data));
236
+ }
237
+ deleteProdutoGrupo(id) {
238
+ const url = this.PRODUTO_GRUPO_BASE_URL + id;
239
+ return this.http.delete(url, this.getHttpOptions()).pipe(map(data => data));
240
+ }
241
+ buscaNcm(ncm) {
242
+ const url = this.PRODUTO_BASE_URL + 'BuscaNCM/';
243
+ const params = new HttpParams()
244
+ .set("ncm", '' + ncm);
245
+ return this.http.get(url, this.getHttpOptions(params)).pipe(map(data => data));
246
+ }
247
+ findNcm(ncm) {
248
+ const url = this.PRODUTO_BASE_URL + 'FindNCM/';
249
+ const params = new HttpParams()
250
+ .set("ncm", '' + ncm);
251
+ return this.http.get(url, this.getHttpOptions(params)).pipe(map(data => data));
252
+ }
253
+ buscaProdutoSubgrupo(setting) {
254
+ const url = this.PRODUTO_SUBGRUPO_BASE_URL + CommonWebService.URL_PART_BUSCA;
255
+ return this.http.post(url, JSON.stringify(setting), this.getHttpOptions()).pipe(map(data => data));
256
+ }
257
+ getNextIdProdutoSubgrupo() {
258
+ const url = this.PRODUTO_SUBGRUPO_BASE_URL + CommonWebService.URL_PART_NEXT_ID;
259
+ return this.http.get(url, this.getHttpOptions()).pipe(map(data => data));
260
+ }
261
+ saveProdutoSubgrupo(s) {
262
+ const url = this.PRODUTO_SUBGRUPO_BASE_URL;
263
+ return this.http.post(url, JSON.stringify(s), this.getHttpOptions()).pipe(map(data => data));
264
+ }
265
+ addProdutoSubgrupo(p) {
266
+ const url = this.PRODUTO_SUBGRUPO_BASE_URL;
267
+ return this.http.put(url, JSON.stringify(p), this.getHttpOptions()).pipe(map(data => data));
268
+ }
269
+ deleteProdutoSubgrupo(id) {
270
+ const url = this.PRODUTO_SUBGRUPO_BASE_URL + id;
271
+ return this.http.delete(url, this.getHttpOptions()).pipe(map(data => data));
272
+ }
273
+ buscaProdutoCategoriaCardapio(setting) {
274
+ const url = this.PRODUTO_CATEGORIA_CARDAPIO_BASE_URL + CommonWebService.URL_PART_BUSCA;
275
+ return this.http.post(url, JSON.stringify(setting), this.getHttpOptions()).pipe(map(data => data));
276
+ }
277
+ getNextIdProdutoCategoriaCardapio() {
278
+ const url = this.PRODUTO_CATEGORIA_CARDAPIO_BASE_URL + CommonWebService.URL_PART_NEXT_ID;
279
+ return this.http.get(url, this.getHttpOptions()).pipe(map(data => data));
280
+ }
281
+ saveProdutoCategoriaCardapio(s) {
282
+ const url = this.PRODUTO_CATEGORIA_CARDAPIO_BASE_URL;
283
+ return this.http.post(url, JSON.stringify(s), this.getHttpOptions()).pipe(map(data => data));
284
+ }
285
+ addProdutoCategoriaCardapio(p) {
286
+ const url = this.PRODUTO_CATEGORIA_CARDAPIO_BASE_URL;
287
+ return this.http.put(url, JSON.stringify(p), this.getHttpOptions()).pipe(map(data => data));
288
+ }
289
+ deleteProdutoCategoriaCardapio(id) {
290
+ const url = this.PRODUTO_CATEGORIA_CARDAPIO_BASE_URL + id;
291
+ return this.http.delete(url, this.getHttpOptions()).pipe(map(data => data));
292
+ }
293
+ getAllSetores() {
294
+ const url = this.ESTOQUE_URL + 'Setor/';
295
+ return this.http.get(url, this.getHttpOptions()).pipe(map(data => data));
296
+ }
173
297
  getHttpOptions(parameters) {
174
298
  return {
175
299
  headers: new HttpHeaders({
@@ -344,7 +468,7 @@ class BusyIndicatorComponent {
344
468
  }
345
469
  }
346
470
  BusyIndicatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BusyIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
347
- BusyIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: { isBusy: "isBusy" }, ngImport: i0, template: "<div class=\"busy-indicator-container\" *ngIf=\"isBusy\">\n <div class=\"busy-indicator\"></div>\n</div>", styles: [".busy-indicator-container{position:fixed;left:50%;top:35%;text-align:center;z-index:1000;margin-left:-47px;background:rgb(255,255,255);border-radius:8px;padding:20px;border:solid 2px transparent;background-clip:padding-box;box-shadow:10px 10px 10px #2e364414}.busy-indicator{border:10px solid #e2e2e2;border-top:10px solid var(--app-color, black);border-radius:50%;width:50px;height:50px;animation:spin .5s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
471
+ BusyIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: { isBusy: "isBusy" }, ngImport: i0, template: "<div class=\"busy-indicator-container\" *ngIf=\"isBusy\">\n <div class=\"busy-indicator\"></div>\n</div>", styles: [".busy-indicator-container{position:fixed;left:50%;top:35%;text-align:center;z-index:1000;margin-left:-47px;background:rgb(255,255,255);border-radius:8px;padding:20px;border:solid 2px transparent;background-clip:padding-box;box-shadow:10px 10px 10px #2e364414}.busy-indicator{border:10px solid #e2e2e2;border-top:10px solid var(--app-color, black);border-radius:50%;width:50px;height:50px;animation:spin .5s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
348
472
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BusyIndicatorComponent, decorators: [{
349
473
  type: Component,
350
474
  args: [{ selector: 'ox-busy-indicator', template: "<div class=\"busy-indicator-container\" *ngIf=\"isBusy\">\n <div class=\"busy-indicator\"></div>\n</div>", styles: [".busy-indicator-container{position:fixed;left:50%;top:35%;text-align:center;z-index:1000;margin-left:-47px;background:rgb(255,255,255);border-radius:8px;padding:20px;border:solid 2px transparent;background-clip:padding-box;box-shadow:10px 10px 10px #2e364414}.busy-indicator{border:10px solid #e2e2e2;border-top:10px solid var(--app-color, black);border-radius:50%;width:50px;height:50px;animation:spin .5s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"] }]
@@ -374,7 +498,7 @@ class FuncionarioFormComponent {
374
498
  }
375
499
  }
376
500
  FuncionarioFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionarioFormComponent, deps: [{ token: CommonWebService }], target: i0.ɵɵFactoryTarget.Component });
377
- 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\"\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>", styles: [""], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.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: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }] });
501
+ 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\"\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>", 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: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }] });
378
502
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionarioFormComponent, decorators: [{
379
503
  type: Component,
380
504
  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\"\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>" }]
@@ -414,7 +538,7 @@ class FuncionarioAddDialogComponent {
414
538
  salvar() {
415
539
  if (this.model)
416
540
  return;
417
- const valMsg = valida(this.model, this.focus);
541
+ const valMsg = valida$2(this.model, this.focus);
418
542
  if (valMsg) {
419
543
  this.notification.showMsgError(valMsg);
420
544
  return;
@@ -432,16 +556,16 @@ class FuncionarioAddDialogComponent {
432
556
  });
433
557
  }
434
558
  }
435
- FuncionarioAddDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionarioAddDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3$1.MatDialog }, { token: i0.ElementRef }, { token: i3$1.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
436
- FuncionarioAddDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: FuncionarioAddDialogComponent, selector: "ox-funcionario-add-dialog", ngImport: i0, template: "<div class=\"header\">\n <h2 class=\"titulo\">Novo Funcion\u00E1rio</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-funcionario-form [model]=\"model\" *ngIf=\"model\"></ox-funcionario-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>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}.header{display:flex;background:white;border-bottom:1px solid #eee}.header .titulo{align-self:center;text-transform:uppercase;flex-grow:1;margin:8px 8px 8px 16px;font-size:15px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.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.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3$1.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: FuncionarioFormComponent, selector: "ox-funcionario-form", inputs: ["model"] }] });
559
+ FuncionarioAddDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionarioAddDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
560
+ FuncionarioAddDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: FuncionarioAddDialogComponent, selector: "ox-funcionario-add-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Novo Funcion\u00E1rio</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-funcionario-form [model]=\"model\" *ngIf=\"model\"></ox-funcionario-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>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.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: FuncionarioFormComponent, selector: "ox-funcionario-form", inputs: ["model"] }] });
437
561
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionarioAddDialogComponent, decorators: [{
438
562
  type: Component,
439
- args: [{ selector: 'ox-funcionario-add-dialog', template: "<div class=\"header\">\n <h2 class=\"titulo\">Novo Funcion\u00E1rio</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-funcionario-form [model]=\"model\" *ngIf=\"model\"></ox-funcionario-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>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}.header{display:flex;background:white;border-bottom:1px solid #eee}.header .titulo{align-self:center;text-transform:uppercase;flex-grow:1;margin:8px 8px 8px 16px;font-size:15px}\n"] }]
563
+ args: [{ selector: 'ox-funcionario-add-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Novo Funcion\u00E1rio</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-funcionario-form [model]=\"model\" *ngIf=\"model\"></ox-funcionario-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>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"] }]
440
564
  }], ctorParameters: function () {
441
565
  return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
442
566
  type: Inject,
443
567
  args: [MAT_DIALOG_DATA]
444
- }] }, { type: i3$1.MatDialog }, { type: i0.ElementRef }, { type: i3$1.MatDialogRef }, { type: ScreenHelperService }];
568
+ }] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }];
445
569
  } });
446
570
 
447
571
  class FuncionarioEditDialogComponent {
@@ -470,7 +594,7 @@ class FuncionarioEditDialogComponent {
470
594
  salvar() {
471
595
  if (!this.model)
472
596
  return;
473
- const valMsg = valida(this.model, this.focus);
597
+ const valMsg = valida$2(this.model, this.focus);
474
598
  if (valMsg) {
475
599
  this.notification.showMsgError(valMsg);
476
600
  return;
@@ -488,16 +612,16 @@ class FuncionarioEditDialogComponent {
488
612
  });
489
613
  }
490
614
  }
491
- FuncionarioEditDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionarioEditDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3$1.MatDialog }, { token: i0.ElementRef }, { token: i3$1.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
492
- FuncionarioEditDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: FuncionarioEditDialogComponent, selector: "ox-funcionario-edit-dialog", ngImport: i0, template: "<div class=\"header\">\n <h2 class=\"titulo\">Editando Funcion\u00E1rio</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-funcionario-form [model]=\"model\" *ngIf=\"model\"></ox-funcionario-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>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}.header{display:flex;background:white;border-bottom:1px solid #eee}.header .titulo{align-self:center;text-transform:uppercase;flex-grow:1;margin:8px 8px 8px 16px;font-size:15px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.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.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3$1.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: FuncionarioFormComponent, selector: "ox-funcionario-form", inputs: ["model"] }] });
615
+ FuncionarioEditDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionarioEditDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
616
+ FuncionarioEditDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: FuncionarioEditDialogComponent, selector: "ox-funcionario-edit-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Funcion\u00E1rio</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-funcionario-form [model]=\"model\" *ngIf=\"model\"></ox-funcionario-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>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.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: FuncionarioFormComponent, selector: "ox-funcionario-form", inputs: ["model"] }] });
493
617
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionarioEditDialogComponent, decorators: [{
494
618
  type: Component,
495
- args: [{ selector: 'ox-funcionario-edit-dialog', template: "<div class=\"header\">\n <h2 class=\"titulo\">Editando Funcion\u00E1rio</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-funcionario-form [model]=\"model\" *ngIf=\"model\"></ox-funcionario-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>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}.header{display:flex;background:white;border-bottom:1px solid #eee}.header .titulo{align-self:center;text-transform:uppercase;flex-grow:1;margin:8px 8px 8px 16px;font-size:15px}\n"] }]
619
+ args: [{ selector: 'ox-funcionario-edit-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Funcion\u00E1rio</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-funcionario-form [model]=\"model\" *ngIf=\"model\"></ox-funcionario-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>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"] }]
496
620
  }], ctorParameters: function () {
497
621
  return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
498
622
  type: Inject,
499
623
  args: [MAT_DIALOG_DATA]
500
- }] }, { type: i3$1.MatDialog }, { type: i0.ElementRef }, { type: i3$1.MatDialogRef }, { type: ScreenHelperService }];
624
+ }] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }];
501
625
  } });
502
626
 
503
627
  const fadeAnimation = trigger('fade', [
@@ -542,13 +666,13 @@ class AlertDialogComponent {
542
666
  ngOnInit() {
543
667
  }
544
668
  }
545
- AlertDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AlertDialogComponent, deps: [{ token: i3$1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
546
- AlertDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: AlertDialogComponent, selector: "app-alert-dialog", ngImport: i0, template: "<h1 mat-dialog-title>{{args.titulo}}</h1>\n<div mat-dialog-content>\n <p>{{args.msg}}</p>\n</div>\n<mat-dialog-actions align=\"end\">\n <button mat-button [mat-dialog-close]=\"false\">Cancelar</button>\n <button mat-button [mat-dialog-close]=\"true\" cdkFocusInitial>Continuar</button>\n</mat-dialog-actions>", styles: [""], dependencies: [{ kind: "component", type: i2.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: "directive", type: i3$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i3$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i3$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i3$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }] });
669
+ AlertDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AlertDialogComponent, deps: [{ token: i3.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
670
+ AlertDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: AlertDialogComponent, selector: "app-alert-dialog", ngImport: i0, template: "<h1 mat-dialog-title>{{args.titulo}}</h1>\n<div mat-dialog-content>\n <p>{{args.msg}}</p>\n</div>\n<mat-dialog-actions align=\"end\">\n <button mat-button [mat-dialog-close]=\"false\">Cancelar</button>\n <button mat-button [mat-dialog-close]=\"true\" cdkFocusInitial>Continuar</button>\n</mat-dialog-actions>", styles: [""], dependencies: [{ 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: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i3.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }] });
547
671
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AlertDialogComponent, decorators: [{
548
672
  type: Component,
549
673
  args: [{ selector: 'app-alert-dialog', template: "<h1 mat-dialog-title>{{args.titulo}}</h1>\n<div mat-dialog-content>\n <p>{{args.msg}}</p>\n</div>\n<mat-dialog-actions align=\"end\">\n <button mat-button [mat-dialog-close]=\"false\">Cancelar</button>\n <button mat-button [mat-dialog-close]=\"true\" cdkFocusInitial>Continuar</button>\n</mat-dialog-actions>" }]
550
674
  }], ctorParameters: function () {
551
- return [{ type: i3$1.MatDialogRef }, { type: undefined, decorators: [{
675
+ return [{ type: i3.MatDialogRef }, { type: undefined, decorators: [{
552
676
  type: Inject,
553
677
  args: [MAT_DIALOG_DATA]
554
678
  }] }];
@@ -573,7 +697,9 @@ class NavegacaoSelecaoDialogUtil {
573
697
  }
574
698
  if (key !== keyDown && key !== keyUp)
575
699
  return;
576
- let index = this.view.items.indexOf(selected, 0);
700
+ let index = -1;
701
+ if (selected)
702
+ this.view.items.indexOf(selected, 0);
577
703
  if (key === keyDown)
578
704
  index++;
579
705
  if (key === keyUp && index > 0)
@@ -888,7 +1014,7 @@ class ItemCardComponent {
888
1014
  }
889
1015
  }
890
1016
  ItemCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ItemCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
891
- ItemCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ItemCardComponent, selector: "ox-item-card", inputs: { nome: "nome", codigo: "codigo", star: "star", cloud: "cloud", desativado: "desativado" }, ngImport: i0, template: "<div class=\"nome-codigo-row\"><span class=\"codigo\" *ngIf=\"codigo\">{{codigo}}</span>{{nome}}</div>\n<div class=\"icons-row\">\n <span class=\"material-icons star\" *ngIf=\"star\">\n grade\n </span>\n <span class=\"material-icons desativado\" *ngIf=\"desativado === true\">\n dangerous\n </span>\n <span class=\"material-icons sync-pendente\" *ngIf=\"cloud === false\">\n cloud_queue\n </span>\n <span class=\"material-icons sync-concluido\" *ngIf=\"cloud === true\">\n cloud_done\n </span>\n</div>\n", styles: [":host{display:flex;flex-direction:row;border-bottom:1px solid #e6e9ec;border-left:3px solid #e6e9ec;padding:12px 16px;background:#fff;justify-content:space-between;cursor:pointer;flex-shrink:0;align-items:center;transition:border-left-color 1s;-webkit-user-select:none;user-select:none;font-size:small}:host:hover{box-shadow:0 0 16px #0000000f;background:transparent;z-index:1}:host(.selected){border-left-color:var(--app-color, black);z-index:1;box-shadow:0 0 8px 5px #00000008;flex-shrink:0;background:linear-gradient(45deg,var(--item-card-selected-bg, rgba(0, 0, 0, .05)),transparent)}.nome-codigo-row{display:flex;flex-direction:row;flex-grow:1;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin-right:8px}.icons-row{display:flex;flex-direction:row;align-items:center;gap:8px}.codigo{color:#666;font-size:x-small;border-radius:4px;padding:0 4px;width:50px;min-width:50px;text-align:center;border:1px solid #eee;margin-right:16px;display:flex;align-items:center;justify-content:center}.sync-pendente{color:#141212;font-size:16px}.sync-concluido{color:#dbdbdb;font-size:16px}.star{color:#000}.desativado{color:#8f07bb;font-size:16px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1017
+ ItemCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ItemCardComponent, selector: "ox-item-card", inputs: { nome: "nome", codigo: "codigo", star: "star", cloud: "cloud", desativado: "desativado" }, ngImport: i0, template: "<div class=\"nome-codigo-row\"><span class=\"codigo\" *ngIf=\"codigo\">{{codigo}}</span>{{nome}}</div>\n<div class=\"icons-row\">\n <span class=\"material-icons star\" *ngIf=\"star\">\n grade\n </span>\n <span class=\"material-icons desativado\" *ngIf=\"desativado === true\">\n dangerous\n </span>\n <span class=\"material-icons sync-pendente\" *ngIf=\"cloud === false\">\n cloud_queue\n </span>\n <span class=\"material-icons sync-concluido\" *ngIf=\"cloud === true\">\n cloud_done\n </span>\n</div>\n", styles: [":host{display:flex;flex-direction:row;border-bottom:1px solid #e6e9ec;border-left:3px solid #e6e9ec;padding:12px 16px;background:#fff;justify-content:space-between;cursor:pointer;flex-shrink:0;align-items:center;transition:border-left-color 1s;-webkit-user-select:none;user-select:none;font-size:small}:host:hover{box-shadow:0 0 16px #0000000f;background:transparent;z-index:1}:host(.selected){border-left-color:var(--app-color, black);z-index:1;box-shadow:0 0 8px 5px #00000008;flex-shrink:0;background:linear-gradient(45deg,var(--item-card-selected-bg, rgba(0, 0, 0, .05)),transparent)}.nome-codigo-row{display:flex;flex-direction:row;flex-grow:1;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin-right:8px}.icons-row{display:flex;flex-direction:row;align-items:center;gap:8px}.codigo{color:#666;font-size:x-small;border-radius:4px;padding:0 4px;width:50px;min-width:50px;text-align:center;border:1px solid #eee;margin-right:16px;display:flex;align-items:center;justify-content:center}.sync-pendente{color:#141212;font-size:16px}.sync-concluido{color:#dbdbdb;font-size:16px}.star{color:#000}.desativado{color:#8f07bb;font-size:16px}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
892
1018
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ItemCardComponent, decorators: [{
893
1019
  type: Component,
894
1020
  args: [{ selector: 'ox-item-card', template: "<div class=\"nome-codigo-row\"><span class=\"codigo\" *ngIf=\"codigo\">{{codigo}}</span>{{nome}}</div>\n<div class=\"icons-row\">\n <span class=\"material-icons star\" *ngIf=\"star\">\n grade\n </span>\n <span class=\"material-icons desativado\" *ngIf=\"desativado === true\">\n dangerous\n </span>\n <span class=\"material-icons sync-pendente\" *ngIf=\"cloud === false\">\n cloud_queue\n </span>\n <span class=\"material-icons sync-concluido\" *ngIf=\"cloud === true\">\n cloud_done\n </span>\n</div>\n", styles: [":host{display:flex;flex-direction:row;border-bottom:1px solid #e6e9ec;border-left:3px solid #e6e9ec;padding:12px 16px;background:#fff;justify-content:space-between;cursor:pointer;flex-shrink:0;align-items:center;transition:border-left-color 1s;-webkit-user-select:none;user-select:none;font-size:small}:host:hover{box-shadow:0 0 16px #0000000f;background:transparent;z-index:1}:host(.selected){border-left-color:var(--app-color, black);z-index:1;box-shadow:0 0 8px 5px #00000008;flex-shrink:0;background:linear-gradient(45deg,var(--item-card-selected-bg, rgba(0, 0, 0, .05)),transparent)}.nome-codigo-row{display:flex;flex-direction:row;flex-grow:1;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin-right:8px}.icons-row{display:flex;flex-direction:row;align-items:center;gap:8px}.codigo{color:#666;font-size:x-small;border-radius:4px;padding:0 4px;width:50px;min-width:50px;text-align:center;border:1px solid #eee;margin-right:16px;display:flex;align-items:center;justify-content:center}.sync-pendente{color:#141212;font-size:16px}.sync-concluido{color:#dbdbdb;font-size:16px}.star{color:#000}.desativado{color:#8f07bb;font-size:16px}\n"] }]
@@ -1016,7 +1142,7 @@ class FuncionariosComponent {
1016
1142
  const item = this.selectedItem;
1017
1143
  if (!item)
1018
1144
  return;
1019
- const valMsg = valida(item, this.focus);
1145
+ const valMsg = valida$2(item, this.focus);
1020
1146
  if (valMsg) {
1021
1147
  this.notification.showMsgError(valMsg);
1022
1148
  return;
@@ -1032,12 +1158,12 @@ class FuncionariosComponent {
1032
1158
  });
1033
1159
  }
1034
1160
  }
1035
- FuncionariosComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionariosComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: i3$1.MatDialog }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
1036
- FuncionariosComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: FuncionariosComponent, selector: "ox-funcionarios", 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 </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=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Funcion\u00E1rios</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 </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 [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um funcion\u00E1rio no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <ox-funcionario-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\">\n </ox-funcionario-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}\n"], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.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.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: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }, { kind: "component", type: FuncionarioFormComponent, selector: "ox-funcionario-form", inputs: ["model"] }, { kind: "pipe", type: i1$2.UpperCasePipe, name: "uppercase" }], animations: [fadeAnimation] });
1161
+ FuncionariosComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionariosComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: i3.MatDialog }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
1162
+ FuncionariosComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: FuncionariosComponent, selector: "ox-funcionarios", 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 </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=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Funcion\u00E1rios</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 </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 [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um funcion\u00E1rio no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <ox-funcionario-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\">\n </ox-funcionario-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}\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: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }, { kind: "component", type: FuncionarioFormComponent, selector: "ox-funcionario-form", inputs: ["model"] }, { kind: "pipe", type: i6.UpperCasePipe, name: "uppercase" }], animations: [fadeAnimation] });
1037
1163
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionariosComponent, decorators: [{
1038
1164
  type: Component,
1039
1165
  args: [{ selector: 'ox-funcionarios', 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 </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=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Funcion\u00E1rios</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 </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 [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um funcion\u00E1rio no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <ox-funcionario-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\">\n </ox-funcionario-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}\n"] }]
1040
- }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: i3$1.MatDialog }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
1166
+ }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialog }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
1041
1167
 
1042
1168
  class CheckButtonComponent {
1043
1169
  constructor() {
@@ -1123,7 +1249,7 @@ class ImageViewerComponent {
1123
1249
  }
1124
1250
  }
1125
1251
  ImageViewerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ImageViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1126
- ImageViewerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ImageViewerComponent, selector: "ox-image-viewer", inputs: { info: "info", infos: "infos", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, host: { listeners: { "click": "onClick($event)" } }, ngImport: i0, template: "<div class=\"image-fullsize\" *ngIf=\"isOpen\">\n <div class=\"titulo\">\n {{info?.titulo}}\n </div>\n <div class=\"img-container\" (click)=\"isOpen = !isOpen\">\n <img class=\"image\" *ngIf=\"info\" [src]=\"info?.url\" />\n </div>\n <div class=\"action-bar\" *ngIf=\"infos\">\n <button (click)=\"goBack()\" [disabled]=\"disableBack\" mat-icon-button>\n <mat-icon>chevron_left</mat-icon>\n </button>\n <span class=\"picker-text\">\n {{paginaAtual}}/{{infos?.length}}\n </span>\n <button (click)=\"goNext()\" [disabled]=\"disableNext\" mat-icon-button>\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n</div>\n", styles: [".image-fullsize{position:absolute;left:0;top:0;background:rgba(0,0,0,.8);width:100%;height:100%;display:flex;flex-flow:column}.titulo{color:#fff;text-align:center;padding:16px;font-size:large;font-weight:300}.action-bar{background:linear-gradient(135deg,rgba(0,0,0,.8) 0%,rgba(0,0,0,.9) 50%,rgba(0,0,0,.8) 100%);color:#fff;padding:8px}.img-container{flex-grow:1;display:flex;justify-content:center;align-items:center}.image{box-shadow:0 5px 35px #000000a6;max-width:100%;height:auto}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.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.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
1252
+ ImageViewerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ImageViewerComponent, selector: "ox-image-viewer", inputs: { info: "info", infos: "infos", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, host: { listeners: { "click": "onClick($event)" } }, ngImport: i0, template: "<div class=\"image-fullsize\" *ngIf=\"isOpen\">\n <div class=\"titulo\">\n {{info?.titulo}}\n </div>\n <div class=\"img-container\" (click)=\"isOpen = !isOpen\">\n <img class=\"image\" *ngIf=\"info\" [src]=\"info?.url\" />\n </div>\n <div class=\"action-bar\" *ngIf=\"infos\">\n <button (click)=\"goBack()\" [disabled]=\"disableBack\" mat-icon-button>\n <mat-icon>chevron_left</mat-icon>\n </button>\n <span class=\"picker-text\">\n {{paginaAtual}}/{{infos?.length}}\n </span>\n <button (click)=\"goNext()\" [disabled]=\"disableNext\" mat-icon-button>\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n</div>\n", styles: [".image-fullsize{position:absolute;left:0;top:0;background:rgba(0,0,0,.8);width:100%;height:100%;display:flex;flex-flow:column}.titulo{color:#fff;text-align:center;padding:16px;font-size:large;font-weight:300}.action-bar{background:linear-gradient(135deg,rgba(0,0,0,.8) 0%,rgba(0,0,0,.9) 50%,rgba(0,0,0,.8) 100%);color:#fff;padding:8px}.img-container{flex-grow:1;display:flex;justify-content:center;align-items:center}.image{box-shadow:0 5px 35px #000000a6;max-width:100%;height:auto}\n"], dependencies: [{ 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"] }] });
1127
1253
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ImageViewerComponent, decorators: [{
1128
1254
  type: Component,
1129
1255
  args: [{ selector: 'ox-image-viewer', template: "<div class=\"image-fullsize\" *ngIf=\"isOpen\">\n <div class=\"titulo\">\n {{info?.titulo}}\n </div>\n <div class=\"img-container\" (click)=\"isOpen = !isOpen\">\n <img class=\"image\" *ngIf=\"info\" [src]=\"info?.url\" />\n </div>\n <div class=\"action-bar\" *ngIf=\"infos\">\n <button (click)=\"goBack()\" [disabled]=\"disableBack\" mat-icon-button>\n <mat-icon>chevron_left</mat-icon>\n </button>\n <span class=\"picker-text\">\n {{paginaAtual}}/{{infos?.length}}\n </span>\n <button (click)=\"goNext()\" [disabled]=\"disableNext\" mat-icon-button>\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n</div>\n", styles: [".image-fullsize{position:absolute;left:0;top:0;background:rgba(0,0,0,.8);width:100%;height:100%;display:flex;flex-flow:column}.titulo{color:#fff;text-align:center;padding:16px;font-size:large;font-weight:300}.action-bar{background:linear-gradient(135deg,rgba(0,0,0,.8) 0%,rgba(0,0,0,.9) 50%,rgba(0,0,0,.8) 100%);color:#fff;padding:8px}.img-container{flex-grow:1;display:flex;justify-content:center;align-items:center}.image{box-shadow:0 5px 35px #000000a6;max-width:100%;height:auto}\n"] }]
@@ -1241,7 +1367,7 @@ class MonthYearPickerComponent {
1241
1367
  }
1242
1368
  }
1243
1369
  MonthYearPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: MonthYearPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1244
- MonthYearPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: MonthYearPickerComponent, selector: "ox-month-year-picker", inputs: { blockFuture: "blockFuture", modoAnual: "modoAnual", ano: "ano", mes: "mes" }, outputs: { anoChange: "anoChange", mesChange: "mesChange", changed: "changed" }, ngImport: i0, template: "<div class=\"picker-container\">\n <div>\n <button mat-icon-button (click)=\"goBack()\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n </div>\n <span class=\"picker-text\">\n {{text}}\n </span>\n <div>\n <button mat-icon-button (click)=\"goNext()\" [disabled]=\"disableNext\" >\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n</div>", styles: [".picker-container{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;min-width:250px}.picker-text{flex-flow:1;flex-grow:1;text-align:center;font-weight:700}\n"], dependencies: [{ kind: "component", type: i2.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.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
1370
+ MonthYearPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: MonthYearPickerComponent, selector: "ox-month-year-picker", inputs: { blockFuture: "blockFuture", modoAnual: "modoAnual", ano: "ano", mes: "mes" }, outputs: { anoChange: "anoChange", mesChange: "mesChange", changed: "changed" }, ngImport: i0, template: "<div class=\"picker-container\">\n <div>\n <button mat-icon-button (click)=\"goBack()\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n </div>\n <span class=\"picker-text\">\n {{text}}\n </span>\n <div>\n <button mat-icon-button (click)=\"goNext()\" [disabled]=\"disableNext\" >\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n</div>", styles: [".picker-container{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;min-width:250px}.picker-text{flex-flow:1;flex-grow:1;text-align:center;font-weight:700}\n"], dependencies: [{ 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"] }] });
1245
1371
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: MonthYearPickerComponent, decorators: [{
1246
1372
  type: Component,
1247
1373
  args: [{ selector: 'ox-month-year-picker', template: "<div class=\"picker-container\">\n <div>\n <button mat-icon-button (click)=\"goBack()\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n </div>\n <span class=\"picker-text\">\n {{text}}\n </span>\n <div>\n <button mat-icon-button (click)=\"goNext()\" [disabled]=\"disableNext\" >\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n</div>", styles: [".picker-container{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;min-width:250px}.picker-text{flex-flow:1;flex-grow:1;text-align:center;font-weight:700}\n"] }]
@@ -1342,7 +1468,7 @@ class NumericPickerComponent {
1342
1468
  }
1343
1469
  }
1344
1470
  NumericPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NumericPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1345
- NumericPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: NumericPickerComponent, selector: "ox-numeric-picker", inputs: { value: "value", max: "max", min: "min" }, outputs: { valueChange: "valueChange", change: "change" }, ngImport: i0, template: "<div>\n <button mat-icon-button (click)=\"goBack()\" [disabled]=\"disableBack\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n</div>\n<input [(ngModel)]=\"text\" (change)=\"onTextEdit($event)\" class=\"date\">\n<div>\n <button mat-icon-button (click)=\"goNext()\" [disabled]=\"disableNext\" >\n <mat-icon>chevron_right</mat-icon>\n </button>\n</div>", styles: [":host{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;min-width:60px}\n"], dependencies: [{ 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.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.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
1471
+ NumericPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: NumericPickerComponent, selector: "ox-numeric-picker", inputs: { value: "value", max: "max", min: "min" }, outputs: { valueChange: "valueChange", change: "change" }, ngImport: i0, template: "<div>\n <button mat-icon-button (click)=\"goBack()\" [disabled]=\"disableBack\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n</div>\n<input [(ngModel)]=\"text\" (change)=\"onTextEdit($event)\" class=\"date\">\n<div>\n <button mat-icon-button (click)=\"goNext()\" [disabled]=\"disableNext\" >\n <mat-icon>chevron_right</mat-icon>\n </button>\n</div>", styles: [":host{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;min-width:60px}\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.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"] }] });
1346
1472
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NumericPickerComponent, decorators: [{
1347
1473
  type: Component,
1348
1474
  args: [{ selector: 'ox-numeric-picker', template: "<div>\n <button mat-icon-button (click)=\"goBack()\" [disabled]=\"disableBack\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n</div>\n<input [(ngModel)]=\"text\" (change)=\"onTextEdit($event)\" class=\"date\">\n<div>\n <button mat-icon-button (click)=\"goNext()\" [disabled]=\"disableNext\" >\n <mat-icon>chevron_right</mat-icon>\n </button>\n</div>", styles: [":host{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;min-width:60px}\n"] }]
@@ -1406,7 +1532,7 @@ class PaginatorComponent {
1406
1532
  }
1407
1533
  }
1408
1534
  PaginatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: PaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1409
- PaginatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: PaginatorComponent, selector: "ox-paginator", inputs: { pageSize: "pageSize", paginaAtual: "paginaAtual", totalPaginas: "totalPaginas" }, outputs: { paginaAtualChange: "paginaAtualChange", totalPaginasChange: "totalPaginasChange", change: "change" }, ngImport: i0, template: "<button [disabled]=\"inicio\" mat-icon-button (click)=\"goBack()\">\n <mat-icon>chevron_left</mat-icon>\n</button>\n<span class=\"picker-text\">\n {{paginaAtual}}/{{totalPaginas}}\n</span>\n<button [disabled]=\"fim\" mat-icon-button (click)=\"goNext()\">\n <mat-icon>chevron_right</mat-icon>\n</button>\n", styles: [":host{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;flex-wrap:nowrap}.picker-text{flex-flow:1;flex-grow:1;text-align:center}\n"], dependencies: [{ kind: "component", type: i2.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.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
1535
+ PaginatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: PaginatorComponent, selector: "ox-paginator", inputs: { pageSize: "pageSize", paginaAtual: "paginaAtual", totalPaginas: "totalPaginas" }, outputs: { paginaAtualChange: "paginaAtualChange", totalPaginasChange: "totalPaginasChange", change: "change" }, ngImport: i0, template: "<button [disabled]=\"inicio\" mat-icon-button (click)=\"goBack()\">\n <mat-icon>chevron_left</mat-icon>\n</button>\n<span class=\"picker-text\">\n {{paginaAtual}}/{{totalPaginas}}\n</span>\n<button [disabled]=\"fim\" mat-icon-button (click)=\"goNext()\">\n <mat-icon>chevron_right</mat-icon>\n</button>\n", styles: [":host{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;flex-wrap:nowrap}.picker-text{flex-flow:1;flex-grow:1;text-align:center}\n"], dependencies: [{ 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"] }] });
1410
1536
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: PaginatorComponent, decorators: [{
1411
1537
  type: Component,
1412
1538
  args: [{ selector: 'ox-paginator', template: "<button [disabled]=\"inicio\" mat-icon-button (click)=\"goBack()\">\n <mat-icon>chevron_left</mat-icon>\n</button>\n<span class=\"picker-text\">\n {{paginaAtual}}/{{totalPaginas}}\n</span>\n<button [disabled]=\"fim\" mat-icon-button (click)=\"goNext()\">\n <mat-icon>chevron_right</mat-icon>\n</button>\n", styles: [":host{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;flex-wrap:nowrap}.picker-text{flex-flow:1;flex-grow:1;text-align:center}\n"] }]
@@ -1448,7 +1574,7 @@ class RadioButtonGroupComponent {
1448
1574
  }
1449
1575
  }
1450
1576
  RadioButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: RadioButtonGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1451
- RadioButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: RadioButtonGroupComponent, selector: "ox-radio-button-group", inputs: { selectedItem: "selectedItem", items: "items" }, outputs: { change: "change" }, ngImport: i0, template: "<ox-check-button [radioBehavior]=\"true\" (changed)=\"raiseChange(item)\" [checked]=\"item == selectedItem\" *ngFor=\"let item of items\">\n {{item.name}}\n</ox-check-button>", styles: [":host>:first-child{border-radius:4px 0 0 4px}:host>:last-child{border-radius:0 4px 4px 0}\n"], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: CheckButtonComponent, selector: "ox-check-button", inputs: ["checked", "radioBehavior"], outputs: ["changed"] }] });
1577
+ RadioButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: RadioButtonGroupComponent, selector: "ox-radio-button-group", inputs: { selectedItem: "selectedItem", items: "items" }, outputs: { change: "change" }, ngImport: i0, template: "<ox-check-button [radioBehavior]=\"true\" (changed)=\"raiseChange(item)\" [checked]=\"item == selectedItem\" *ngFor=\"let item of items\">\n {{item.name}}\n</ox-check-button>", styles: [":host>:first-child{border-radius:4px 0 0 4px}:host>:last-child{border-radius:0 4px 4px 0}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: CheckButtonComponent, selector: "ox-check-button", inputs: ["checked", "radioBehavior"], outputs: ["changed"] }] });
1452
1578
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: RadioButtonGroupComponent, decorators: [{
1453
1579
  type: Component,
1454
1580
  args: [{ selector: 'ox-radio-button-group', template: "<ox-check-button [radioBehavior]=\"true\" (changed)=\"raiseChange(item)\" [checked]=\"item == selectedItem\" *ngFor=\"let item of items\">\n {{item.name}}\n</ox-check-button>", styles: [":host>:first-child{border-radius:4px 0 0 4px}:host>:last-child{border-radius:0 4px 4px 0}\n"] }]
@@ -1468,127 +1594,128 @@ class SafeHtmlPipe {
1468
1594
  return this.sanitizer.bypassSecurityTrustHtml(html);
1469
1595
  }
1470
1596
  }
1471
- SafeHtmlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: SafeHtmlPipe, deps: [{ token: i1$3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
1597
+ SafeHtmlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: SafeHtmlPipe, deps: [{ token: i1$2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
1472
1598
  SafeHtmlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.5", ngImport: i0, type: SafeHtmlPipe, name: "safeHtml" });
1473
1599
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: SafeHtmlPipe, decorators: [{
1474
1600
  type: Pipe,
1475
1601
  args: [{
1476
1602
  name: 'safeHtml'
1477
1603
  }]
1478
- }], ctorParameters: function () { return [{ type: i1$3.DomSanitizer }]; } });
1604
+ }], ctorParameters: function () { return [{ type: i1$2.DomSanitizer }]; } });
1479
1605
 
1480
- Array.prototype.remove = function (item) {
1481
- const index = this.indexOf(item);
1482
- if (index === -1)
1483
- return false;
1484
- this.splice(index, 1);
1485
- return true;
1486
- };
1487
- Array.prototype.firstOrNull = function () {
1488
- if (this.length > 0)
1489
- return this[0];
1490
- return null;
1491
- };
1492
- Date.prototype.addDays = function (days) {
1493
- var result = new Date(this);
1494
- result.setDate(result.getDate() + days);
1495
- return result;
1496
- };
1497
- class OxpiNglibModule {
1606
+ var ModalidadeBaseICMS;
1607
+ (function (ModalidadeBaseICMS) {
1608
+ ModalidadeBaseICMS[ModalidadeBaseICMS["MargemValorAgregado"] = 0] = "MargemValorAgregado";
1609
+ ModalidadeBaseICMS[ModalidadeBaseICMS["PautaValor"] = 1] = "PautaValor";
1610
+ ModalidadeBaseICMS[ModalidadeBaseICMS["Pre\u00E7oTabeladoMax"] = 2] = "Pre\u00E7oTabeladoMax";
1611
+ ModalidadeBaseICMS[ModalidadeBaseICMS["ValorDaOpera\u00E7\u00E3o"] = 3] = "ValorDaOpera\u00E7\u00E3o";
1612
+ })(ModalidadeBaseICMS || (ModalidadeBaseICMS = {}));
1613
+ function createProduct() {
1614
+ return {
1615
+ id: 0,
1616
+ nome: '',
1617
+ unidade: 'UN',
1618
+ precoCusto: 0,
1619
+ precoVenda: 0,
1620
+ precoFuncionario: 0,
1621
+ estoqueMinimo: 0,
1622
+ referencia: '',
1623
+ aliquotaICMS: null,
1624
+ ncm: null,
1625
+ grupoId: 0,
1626
+ grupoNome: null,
1627
+ subgrupoId: 0,
1628
+ subgrupoNome: null,
1629
+ quantidadeSuite: 0,
1630
+ estoqueControlado: true,
1631
+ imprimiCozinha: true,
1632
+ imprimeCorredor: false,
1633
+ verNaRecepcao: true,
1634
+ prato: false,
1635
+ isAtivo: true,
1636
+ isComposto: true,
1637
+ isIngrediente: true,
1638
+ omiteCliente: false,
1639
+ estoqueRecepcao: false,
1640
+ estoqueRecepcaoQuantidade: 0,
1641
+ gtin: null,
1642
+ cfop: null,
1643
+ csT_icms: null,
1644
+ modBC_icms: 0,
1645
+ pICMS_icms: null,
1646
+ pRedBC_icms: null,
1647
+ pfcP_icms: null,
1648
+ vbcfcP_icms: null,
1649
+ pfcpsT_icms: null,
1650
+ pRedBCEfet_icms: null,
1651
+ vbcEfet_icms: null,
1652
+ picmsEfet_icms: null,
1653
+ vicmsEfet_icms: null,
1654
+ csT_pis: null,
1655
+ vbC_pis: null,
1656
+ ppiS_pis: null,
1657
+ csT_cofins: null,
1658
+ vbC_cofins: null,
1659
+ pcofinS_cofins: null,
1660
+ psT_icms: null,
1661
+ vbcstRet_icms: null,
1662
+ vicmsSubstituto_icms: null,
1663
+ vicmsstRet_icms: null,
1664
+ emiteNFCe: false,
1665
+ cest: null,
1666
+ vbcfcpsT_icms: null,
1667
+ vbcfcpstRet_icms: null,
1668
+ pfcpstRet_icms: null,
1669
+ sitTrib: null,
1670
+ setorSubEstoqueId: null,
1671
+ setorSubEstoqueNome: null,
1672
+ setorPrincipalId: null,
1673
+ setorPrincipalNome: null,
1674
+ qtdMinSubEstoque: null,
1675
+ disponivelCardapio: false,
1676
+ categoriaCardapioId: null,
1677
+ categoriaCardapioNome: null,
1678
+ descricao: null,
1679
+ enviadoPC: false,
1680
+ qbcProd_cofins: null,
1681
+ vAliqProd_cofins: null
1682
+ };
1498
1683
  }
1499
- OxpiNglibModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: OxpiNglibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1500
- OxpiNglibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.5", ngImport: i0, type: OxpiNglibModule, declarations: [BusyIndicatorComponent,
1501
- MonthYearPickerComponent,
1502
- ImageViewerComponent,
1503
- NumericPickerComponent,
1504
- PaginatorComponent,
1505
- CheckButtonComponent,
1506
- RadioButtonGroupComponent,
1507
- ItemCardComponent,
1508
- SafeHtmlPipe,
1509
- AlertDialogComponent,
1510
- FuncionariosComponent,
1511
- FuncionarioFormComponent,
1512
- FuncionarioEditDialogComponent,
1513
- FuncionarioAddDialogComponent], imports: [BrowserModule,
1514
- BrowserAnimationsModule,
1515
- FormsModule,
1516
- MatButtonModule,
1517
- MatIconModule,
1518
- MatDialogModule,
1519
- MatSelectModule], exports: [BusyIndicatorComponent,
1520
- MonthYearPickerComponent,
1521
- ImageViewerComponent,
1522
- NumericPickerComponent,
1523
- PaginatorComponent,
1524
- CheckButtonComponent,
1525
- RadioButtonGroupComponent,
1526
- ItemCardComponent,
1527
- SafeHtmlPipe] });
1528
- OxpiNglibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: OxpiNglibModule, imports: [BrowserModule,
1529
- BrowserAnimationsModule,
1530
- FormsModule,
1531
- MatButtonModule,
1532
- MatIconModule,
1533
- MatDialogModule,
1534
- MatSelectModule] });
1535
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: OxpiNglibModule, decorators: [{
1536
- type: NgModule,
1537
- args: [{
1538
- declarations: [
1539
- BusyIndicatorComponent,
1540
- MonthYearPickerComponent,
1541
- ImageViewerComponent,
1542
- NumericPickerComponent,
1543
- PaginatorComponent,
1544
- CheckButtonComponent,
1545
- RadioButtonGroupComponent,
1546
- ItemCardComponent,
1547
- SafeHtmlPipe,
1548
- AlertDialogComponent,
1549
- FuncionariosComponent,
1550
- FuncionarioFormComponent,
1551
- FuncionarioEditDialogComponent,
1552
- FuncionarioAddDialogComponent
1553
- ],
1554
- imports: [
1555
- BrowserModule,
1556
- BrowserAnimationsModule,
1557
- FormsModule,
1558
- MatButtonModule,
1559
- MatIconModule,
1560
- MatDialogModule,
1561
- MatSelectModule,
1562
- ],
1563
- exports: [
1564
- BusyIndicatorComponent,
1565
- MonthYearPickerComponent,
1566
- ImageViewerComponent,
1567
- NumericPickerComponent,
1568
- PaginatorComponent,
1569
- CheckButtonComponent,
1570
- RadioButtonGroupComponent,
1571
- ItemCardComponent,
1572
- SafeHtmlPipe
1573
- ]
1574
- }]
1575
- }] });
1576
-
1577
- class BusyState {
1578
- constructor() {
1579
- this.isBusy = false;
1580
- this.counter = 0;
1684
+ ;
1685
+ function valida$1(item, focus) {
1686
+ if (valTextEmpty(item.nome)) {
1687
+ focus.set('nome');
1688
+ return 'Digite um nome válido.';
1581
1689
  }
1582
- show() {
1583
- this.counter++;
1584
- this.isBusy = true;
1690
+ if (valNumberEmpty(item.grupoId)) {
1691
+ return 'Escolha um grupo de produto.';
1585
1692
  }
1586
- hide() {
1587
- this.counter--;
1588
- if (this.counter < 0)
1589
- this.counter = 0;
1590
- if (this.counter == 0)
1591
- this.isBusy = false;
1693
+ if (valNumberEmpty(item.subgrupoId)) {
1694
+ return 'Escolha um subgrupo de produto.';
1695
+ }
1696
+ if (valTextEmpty(item.unidade)) {
1697
+ focus.set('unidade');
1698
+ return 'Digite uma unidade.';
1699
+ }
1700
+ if (item.disponivelCardapio) {
1701
+ if (valNumberEmpty(item.categoriaCardapioId))
1702
+ return 'Escolha uma categoria do cardápio digital.';
1703
+ if (valTextEmpty(item.descricao)) {
1704
+ focus.set('descricao');
1705
+ return 'Digite uma descrição para o cardápio digital.';
1706
+ }
1707
+ }
1708
+ return null;
1709
+ }
1710
+
1711
+ class ProdutoSearchSetting extends SearchSetting {
1712
+ constructor() {
1713
+ super();
1714
+ this.exibeNaoControladoEstoque = true;
1715
+ this.exibeApenasMostraRecepcao = false;
1716
+ this.exibeInativo = false;
1717
+ this.exibeImprimiCozinha = false;
1718
+ this.exibeHePrato = false;
1592
1719
  }
1593
1720
  }
1594
1721
 
@@ -1657,63 +1784,2046 @@ class NumberParser {
1657
1784
  }
1658
1785
  }
1659
1786
 
1660
- class Ordem {
1661
- constructor(ordens, isCrescente, onToggle) {
1662
- const d = ordens.filter(x => x.default === true).firstOrNull();
1663
- this.colName = d === null ? ordens[0].value : d.value;
1664
- this.isCrescente = isCrescente;
1665
- this.onToggle = onToggle;
1666
- }
1667
- toggle() {
1668
- this.isCrescente = !this.isCrescente;
1669
- if (this.onToggle !== undefined)
1670
- this.onToggle();
1671
- }
1672
- toString() {
1673
- return this.colName + (!this.isCrescente ? " desc" : "");
1787
+ function valida(item, focus) {
1788
+ if (valTextEmpty(item.nome)) {
1789
+ focus.set('nome');
1790
+ return 'Digite um nome válido.';
1674
1791
  }
1792
+ return null;
1675
1793
  }
1676
1794
 
1677
- function printTxt(txt) {
1678
- const r = "<!doctype html><head><meta charset=\"utf-8\"></head><body><div style='font-family: \"Courier New\", Courier, monospace; white-space: pre-wrap;color: black;font-weight: bold;word-wrap: break-word;word-break: break-all;overflow-wrap: break-word;'>" + txt + '</div></body>';
1679
- printHtml(r);
1680
- }
1681
- function printHtml(r) {
1682
- const blob = new Blob([r], { type: 'text/html' });
1683
- const url = window.URL.createObjectURL(blob);
1684
- const w = window.open(url, '_blank');
1685
- if (w != null)
1686
- w.print();
1795
+ class ProdutoGrupoFormComponent {
1796
+ constructor() { }
1797
+ ngOnInit() {
1798
+ }
1687
1799
  }
1688
- function selectText(ev) {
1689
- ev.target.select();
1690
- }
1800
+ ProdutoGrupoFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1801
+ ProdutoGrupoFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoGrupoFormComponent, selector: "app-produto-grupo-form", inputs: { model: "model" }, ngImport: i0, template: "<div class=\"form-group\" *ngIf=\"model\">\n <label>Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" required class=\"form-control input-300\" cdkFocusInitial tabindex=\"1\">\n</div>", styles: [":host{display:flex;flex-direction:column}\n"], dependencies: [{ 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"] }] });
1802
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoFormComponent, decorators: [{
1803
+ type: Component,
1804
+ args: [{ selector: 'app-produto-grupo-form', template: "<div class=\"form-group\" *ngIf=\"model\">\n <label>Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" required class=\"form-control input-300\" cdkFocusInitial tabindex=\"1\">\n</div>", styles: [":host{display:flex;flex-direction:column}\n"] }]
1805
+ }], ctorParameters: function () { return []; }, propDecorators: { model: [{
1806
+ type: Input
1807
+ }] } });
1691
1808
 
1692
- class PagamentoRecebimentoSearchSetting extends SearchSetting {
1693
- constructor() {
1694
- super();
1695
- this.exibirPagamentos = true;
1696
- this.exibirRecebimentos = true;
1809
+ class ProdutoCategoriaCardapioAddDialogComponent {
1810
+ constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
1811
+ this.ws = ws;
1812
+ this.notification = notification;
1813
+ this.dataDialog = dataDialog;
1814
+ this.dialog = dialog;
1815
+ this.elRef = elRef;
1816
+ this.dialogRef = dialogRef;
1817
+ this.screenHelper = screenHelper;
1818
+ this.isBusy = false;
1819
+ this.focus = new FocusService();
1820
+ this.model = {
1821
+ id: 0,
1822
+ nome: '',
1823
+ isAtivo: true,
1824
+ enviadoPC: false
1825
+ };
1826
+ this.mobile = this.screenHelper.isMedium;
1827
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
1697
1828
  }
1698
- }
1699
-
1700
- class OcupacaoFilterSetting extends SearchSetting {
1701
- constructor() {
1702
- super();
1703
- this.dom = false;
1704
- this.seg = false;
1705
- this.ter = false;
1706
- this.qua = false;
1707
- this.qui = false;
1708
- this.sex = false;
1709
- this.sab = false;
1829
+ ngOnInit() {
1830
+ this.focus.registerElement(this.elRef.nativeElement);
1710
1831
  }
1711
- }
1712
-
1713
- class OcupacaoSearchSetting extends OcupacaoFilterSetting {
1714
- constructor() {
1715
- super();
1716
- this.dateFieldEnum = OcupacaoSearchDateField.DataBaseCaixa;
1832
+ ngOnDestroy() {
1833
+ this.focus.unregisterElement(this.elRef.nativeElement);
1834
+ }
1835
+ salvar() {
1836
+ const valMsg = valida(this.model, this.focus);
1837
+ if (valMsg) {
1838
+ this.notification.showMsgError(valMsg);
1839
+ return;
1840
+ }
1841
+ this.isBusy = true;
1842
+ this.ws.addProdutoCategoriaCardapio(this.model)
1843
+ .subscribe(r => {
1844
+ this.isBusy = false;
1845
+ this.notification.showMsg("Salvo com sucesso.");
1846
+ if (this.dialogRef)
1847
+ this.dialogRef.close(true);
1848
+ }, err => {
1849
+ this.isBusy = false;
1850
+ this.notification.showMsg(err.error);
1851
+ });
1852
+ }
1853
+ }
1854
+ ProdutoCategoriaCardapioAddDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioAddDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
1855
+ ProdutoCategoriaCardapioAddDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoCategoriaCardapioAddDialogComponent, selector: "app-produto-categoria-cardapio-add-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Nova Categoria</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>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.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: ProdutoGrupoFormComponent, selector: "app-produto-grupo-form", inputs: ["model"] }] });
1856
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioAddDialogComponent, decorators: [{
1857
+ type: Component,
1858
+ args: [{ selector: 'app-produto-categoria-cardapio-add-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Nova Categoria</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>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"] }]
1859
+ }], ctorParameters: function () {
1860
+ return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
1861
+ type: Inject,
1862
+ args: [MAT_DIALOG_DATA]
1863
+ }] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }];
1864
+ } });
1865
+
1866
+ class ProdutoCategoriaCardapioEditDialogComponent {
1867
+ constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
1868
+ this.ws = ws;
1869
+ this.notification = notification;
1870
+ this.dataDialog = dataDialog;
1871
+ this.dialog = dialog;
1872
+ this.elRef = elRef;
1873
+ this.dialogRef = dialogRef;
1874
+ this.screenHelper = screenHelper;
1875
+ this.isBusy = false;
1876
+ this.focus = new FocusService();
1877
+ if (dataDialog) {
1878
+ this.model = dataDialog;
1879
+ }
1880
+ this.mobile = this.screenHelper.isMedium;
1881
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
1882
+ }
1883
+ ngOnInit() {
1884
+ this.focus.registerElement(this.elRef.nativeElement);
1885
+ }
1886
+ ngOnDestroy() {
1887
+ this.focus.unregisterElement(this.elRef.nativeElement);
1888
+ }
1889
+ salvar() {
1890
+ if (!this.model)
1891
+ return;
1892
+ const valMsg = valida(this.model, this.focus);
1893
+ if (valMsg) {
1894
+ this.notification.showMsgError(valMsg);
1895
+ return;
1896
+ }
1897
+ this.isBusy = true;
1898
+ this.ws.saveProdutoCategoriaCardapio(this.model)
1899
+ .subscribe(r => {
1900
+ this.isBusy = false;
1901
+ this.notification.showMsg("Salvo com sucesso.");
1902
+ if (this.dialogRef)
1903
+ this.dialogRef.close(true);
1904
+ }, err => {
1905
+ this.isBusy = false;
1906
+ this.notification.showMsg(err.error);
1907
+ });
1908
+ }
1909
+ }
1910
+ ProdutoCategoriaCardapioEditDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioEditDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
1911
+ ProdutoCategoriaCardapioEditDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoCategoriaCardapioEditDialogComponent, selector: "app-produto-categoria-cardapio-edit-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Categoria do Card\u00E1pio</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>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.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: ProdutoGrupoFormComponent, selector: "app-produto-grupo-form", inputs: ["model"] }] });
1912
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioEditDialogComponent, decorators: [{
1913
+ type: Component,
1914
+ args: [{ selector: 'app-produto-categoria-cardapio-edit-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Categoria do Card\u00E1pio</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>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"] }]
1915
+ }], ctorParameters: function () {
1916
+ return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
1917
+ type: Inject,
1918
+ args: [MAT_DIALOG_DATA]
1919
+ }] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }];
1920
+ } });
1921
+
1922
+ class ProdutoCategoriaCardapioSelecaoDialogComponent {
1923
+ constructor(dialogRef, dialog, ws, notification, auth, screenHelper) {
1924
+ this.dialogRef = dialogRef;
1925
+ this.dialog = dialog;
1926
+ this.ws = ws;
1927
+ this.notification = notification;
1928
+ this.screenHelper = screenHelper;
1929
+ this.items = [];
1930
+ this.selectedItem = null;
1931
+ this.isBusy = false;
1932
+ this.setting = new SearchSetting();
1933
+ this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
1934
+ this.nav = new NavegacaoSelecaoDialogUtil(this);
1935
+ this.mobile = this.screenHelper.isMedium;
1936
+ this.allowAdd = auth.permissoes.adminProdutoGrupoAdd;
1937
+ this.allowEdit = auth.permissoes.adminProdutoGrupoPesquisa;
1938
+ }
1939
+ ngOnInit() {
1940
+ this.setting.ordem = "nome";
1941
+ this.atualiza();
1942
+ }
1943
+ atualiza() {
1944
+ this.isBusy = true;
1945
+ this.ws.buscaProdutoCategoriaCardapio(this.setting)
1946
+ .subscribe(r => {
1947
+ this.isBusy = false;
1948
+ this.items = r;
1949
+ console.info(r);
1950
+ }, err => {
1951
+ this.isBusy = false;
1952
+ this.notification.showHttpError(err);
1953
+ });
1954
+ }
1955
+ selectItem(i) {
1956
+ if (this.selectedItem === i) {
1957
+ this.dialogRef.close(i);
1958
+ }
1959
+ this.selectedItem = i;
1960
+ }
1961
+ novo() {
1962
+ let height = (window.innerHeight * 0.90) + 'px';
1963
+ let width = 550 + 'px';
1964
+ if (this.mobile) {
1965
+ width = (window.innerWidth * 0.99) + 'px';
1966
+ //height = (window.innerHeight * 0.98) + 'px';
1967
+ }
1968
+ const dialog = this.dialog.open(ProdutoCategoriaCardapioAddDialogComponent, {
1969
+ width: width,
1970
+ height: height,
1971
+ maxWidth: '100%',
1972
+ panelClass: 'dialog-p0',
1973
+ });
1974
+ dialog.afterClosed().subscribe(result => {
1975
+ if (result === undefined)
1976
+ return;
1977
+ this.notification.showMsg("Salvo com sucesso.");
1978
+ this.atualiza();
1979
+ });
1980
+ }
1981
+ editar() {
1982
+ let height = (window.innerHeight * 0.90) + 'px';
1983
+ let width = 550 + 'px';
1984
+ if (this.mobile) {
1985
+ width = (window.innerWidth * 0.99) + 'px';
1986
+ //height = (window.innerHeight * 0.98) + 'px';
1987
+ }
1988
+ const dialog = this.dialog.open(ProdutoCategoriaCardapioEditDialogComponent, {
1989
+ width: width,
1990
+ height: height,
1991
+ maxWidth: '100%',
1992
+ panelClass: 'dialog-p0',
1993
+ data: this.selectedItem
1994
+ });
1995
+ dialog.afterClosed().subscribe(result => {
1996
+ if (result === undefined)
1997
+ return;
1998
+ this.notification.showMsg("Salvo com sucesso.");
1999
+ this.atualiza();
2000
+ });
2001
+ }
2002
+ }
2003
+ ProdutoCategoriaCardapioSelecaoDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioSelecaoDialogComponent, deps: [{ token: i3.MatDialogRef }, { token: i3.MatDialog }, { token: CommonWebService }, { token: NotificationService }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
2004
+ ProdutoCategoriaCardapioSelecaoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoCategoriaCardapioSelecaoDialogComponent, selector: "app-produto-categoria-cardapio-selecao-dialog", ngImport: i0, template: "<div class=\"dialog-header\">\n <h2>Sele\u00E7\u00E3o de Grupos</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<!--\n <div (click)=\"selectItem(i)\" [ngClass]=\"{selected: selectedItem === i}\" class=\"list-item\" *ngFor=\"let i of items\">\n <span>{{i.nome}}</span>\n </div>\n-->\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>\n ", 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"] }] });
2005
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioSelecaoDialogComponent, decorators: [{
2006
+ type: Component,
2007
+ args: [{ selector: 'app-produto-categoria-cardapio-selecao-dialog', template: "<div class=\"dialog-header\">\n <h2>Sele\u00E7\u00E3o de Grupos</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<!--\n <div (click)=\"selectItem(i)\" [ngClass]=\"{selected: selectedItem === i}\" class=\"list-item\" *ngFor=\"let i of items\">\n <span>{{i.nome}}</span>\n </div>\n-->\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>\n ", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
2008
+ }], ctorParameters: function () { return [{ type: i3.MatDialogRef }, { type: i3.MatDialog }, { type: CommonWebService }, { type: NotificationService }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
2009
+
2010
+ class ProdutoGrupoAddDialogComponent {
2011
+ constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
2012
+ this.ws = ws;
2013
+ this.notification = notification;
2014
+ this.dataDialog = dataDialog;
2015
+ this.dialog = dialog;
2016
+ this.elRef = elRef;
2017
+ this.dialogRef = dialogRef;
2018
+ this.screenHelper = screenHelper;
2019
+ this.isBusy = false;
2020
+ this.focus = new FocusService();
2021
+ this.model = {
2022
+ id: 0,
2023
+ nome: '',
2024
+ isAtivo: true,
2025
+ enviadoPC: false
2026
+ };
2027
+ this.mobile = this.screenHelper.isMedium;
2028
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
2029
+ }
2030
+ ngOnInit() {
2031
+ this.focus.registerElement(this.elRef.nativeElement);
2032
+ }
2033
+ ngOnDestroy() {
2034
+ this.focus.unregisterElement(this.elRef.nativeElement);
2035
+ }
2036
+ salvar() {
2037
+ const valMsg = valida(this.model, this.focus);
2038
+ if (valMsg) {
2039
+ this.notification.showMsgError(valMsg);
2040
+ return;
2041
+ }
2042
+ this.isBusy = true;
2043
+ this.ws.addProdutoGrupo(this.model)
2044
+ .subscribe(r => {
2045
+ this.isBusy = false;
2046
+ this.notification.showMsg("Salvo com sucesso.");
2047
+ if (this.dialogRef)
2048
+ this.dialogRef.close(true);
2049
+ }, err => {
2050
+ this.isBusy = false;
2051
+ this.notification.showMsg(err.error);
2052
+ });
2053
+ }
2054
+ }
2055
+ ProdutoGrupoAddDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoAddDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
2056
+ ProdutoGrupoAddDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoGrupoAddDialogComponent, selector: "app-produto-grupo-add-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Novo Grupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>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.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: ProdutoGrupoFormComponent, selector: "app-produto-grupo-form", inputs: ["model"] }] });
2057
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoAddDialogComponent, decorators: [{
2058
+ type: Component,
2059
+ args: [{ selector: 'app-produto-grupo-add-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Novo Grupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>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"] }]
2060
+ }], ctorParameters: function () {
2061
+ return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
2062
+ type: Inject,
2063
+ args: [MAT_DIALOG_DATA]
2064
+ }] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }];
2065
+ } });
2066
+
2067
+ class ProdutoGrupoEditDialogComponent {
2068
+ constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
2069
+ this.ws = ws;
2070
+ this.notification = notification;
2071
+ this.dataDialog = dataDialog;
2072
+ this.dialog = dialog;
2073
+ this.elRef = elRef;
2074
+ this.dialogRef = dialogRef;
2075
+ this.screenHelper = screenHelper;
2076
+ this.isBusy = false;
2077
+ this.focus = new FocusService();
2078
+ if (dataDialog) {
2079
+ this.model = dataDialog;
2080
+ }
2081
+ this.mobile = this.screenHelper.isMedium;
2082
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
2083
+ }
2084
+ ngOnInit() {
2085
+ this.focus.registerElement(this.elRef.nativeElement);
2086
+ }
2087
+ ngOnDestroy() {
2088
+ this.focus.unregisterElement(this.elRef.nativeElement);
2089
+ }
2090
+ salvar() {
2091
+ if (!this.model)
2092
+ return;
2093
+ const valMsg = valida(this.model, this.focus);
2094
+ if (valMsg) {
2095
+ this.notification.showMsgError(valMsg);
2096
+ return;
2097
+ }
2098
+ this.isBusy = true;
2099
+ this.ws.saveProdutoGrupo(this.model)
2100
+ .subscribe(r => {
2101
+ this.isBusy = false;
2102
+ this.notification.showMsg("Salvo com sucesso.");
2103
+ if (this.dialogRef)
2104
+ this.dialogRef.close(true);
2105
+ }, err => {
2106
+ this.isBusy = false;
2107
+ this.notification.showMsg(err.error);
2108
+ });
2109
+ }
2110
+ }
2111
+ ProdutoGrupoEditDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoEditDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
2112
+ ProdutoGrupoEditDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoGrupoEditDialogComponent, selector: "app-produto-grupo-edit-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Grupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>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.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: ProdutoGrupoFormComponent, selector: "app-produto-grupo-form", inputs: ["model"] }] });
2113
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoEditDialogComponent, decorators: [{
2114
+ type: Component,
2115
+ args: [{ selector: 'app-produto-grupo-edit-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Grupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>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"] }]
2116
+ }], ctorParameters: function () {
2117
+ return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
2118
+ type: Inject,
2119
+ args: [MAT_DIALOG_DATA]
2120
+ }] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }];
2121
+ } });
2122
+
2123
+ class ProdutoGrupoSelecaoDialogComponent {
2124
+ constructor(dialogRef, dialog, ws, notification, auth, screenHelper) {
2125
+ this.dialogRef = dialogRef;
2126
+ this.dialog = dialog;
2127
+ this.ws = ws;
2128
+ this.notification = notification;
2129
+ this.screenHelper = screenHelper;
2130
+ this.items = [];
2131
+ this.selectedItem = null;
2132
+ this.isBusy = false;
2133
+ this.setting = new SearchSetting();
2134
+ this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
2135
+ this.nav = new NavegacaoSelecaoDialogUtil(this);
2136
+ this.mobile = this.screenHelper.isMedium;
2137
+ this.allowAdd = auth.permissoes.adminProdutoGrupoAdd;
2138
+ this.allowEdit = auth.permissoes.adminProdutoGrupoPesquisa;
2139
+ }
2140
+ ngOnInit() {
2141
+ this.setting.ordem = "nome";
2142
+ this.atualiza();
2143
+ }
2144
+ atualiza() {
2145
+ this.isBusy = true;
2146
+ this.ws.buscaProdutoGrupo(this.setting)
2147
+ .subscribe(r => {
2148
+ this.isBusy = false;
2149
+ this.items = r;
2150
+ console.info(r);
2151
+ }, err => {
2152
+ this.isBusy = false;
2153
+ this.notification.showHttpError(err);
2154
+ });
2155
+ }
2156
+ selectItem(i) {
2157
+ if (this.selectedItem === i) {
2158
+ this.dialogRef.close(i);
2159
+ }
2160
+ this.selectedItem = i;
2161
+ }
2162
+ novo() {
2163
+ let height = (window.innerHeight * 0.90) + 'px';
2164
+ let width = 550 + 'px';
2165
+ if (this.mobile) {
2166
+ width = (window.innerWidth * 0.99) + 'px';
2167
+ //height = (window.innerHeight * 0.98) + 'px';
2168
+ }
2169
+ const dialog = this.dialog.open(ProdutoGrupoAddDialogComponent, {
2170
+ width: width,
2171
+ height: height,
2172
+ maxWidth: '100%',
2173
+ panelClass: 'dialog-p0',
2174
+ });
2175
+ dialog.afterClosed().subscribe(result => {
2176
+ if (result === undefined)
2177
+ return;
2178
+ this.notification.showMsg("Salvo com sucesso.");
2179
+ this.atualiza();
2180
+ });
2181
+ }
2182
+ editar() {
2183
+ let height = (window.innerHeight * 0.90) + 'px';
2184
+ let width = 550 + 'px';
2185
+ if (this.mobile) {
2186
+ width = (window.innerWidth * 0.99) + 'px';
2187
+ //height = (window.innerHeight * 0.98) + 'px';
2188
+ }
2189
+ const dialog = this.dialog.open(ProdutoGrupoEditDialogComponent, {
2190
+ width: width,
2191
+ height: height,
2192
+ maxWidth: '100%',
2193
+ panelClass: 'dialog-p0',
2194
+ data: this.selectedItem
2195
+ });
2196
+ dialog.afterClosed().subscribe(result => {
2197
+ if (result === undefined)
2198
+ return;
2199
+ this.notification.showMsg("Salvo com sucesso.");
2200
+ this.atualiza();
2201
+ });
2202
+ }
2203
+ }
2204
+ ProdutoGrupoSelecaoDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoSelecaoDialogComponent, deps: [{ token: i3.MatDialogRef }, { token: i3.MatDialog }, { token: CommonWebService }, { token: NotificationService }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
2205
+ ProdutoGrupoSelecaoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoGrupoSelecaoDialogComponent, selector: "app-produto-grupo-selecao-dialog", ngImport: i0, template: "<div class=\"dialog-header\">\n <h2>Sele\u00E7\u00E3o de Grupos</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 == 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>\n ", 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"] }] });
2206
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoSelecaoDialogComponent, decorators: [{
2207
+ type: Component,
2208
+ args: [{ selector: 'app-produto-grupo-selecao-dialog', template: "<div class=\"dialog-header\">\n <h2>Sele\u00E7\u00E3o de Grupos</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 == 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>\n ", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
2209
+ }], ctorParameters: function () { return [{ type: i3.MatDialogRef }, { type: i3.MatDialog }, { type: CommonWebService }, { type: NotificationService }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
2210
+
2211
+ class ProdutosNcmDialogComponent {
2212
+ constructor(dialogRef, dialog, ws, notification, screenHelper) {
2213
+ this.dialogRef = dialogRef;
2214
+ this.dialog = dialog;
2215
+ this.ws = ws;
2216
+ this.notification = notification;
2217
+ this.screenHelper = screenHelper;
2218
+ this.isBusy = false;
2219
+ this.frase = '';
2220
+ this.items = [];
2221
+ this.selectedItem = null;
2222
+ this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
2223
+ this.nav = new NavegacaoSelecaoDialogUtil(this);
2224
+ this.mobile = this.screenHelper.isMedium;
2225
+ }
2226
+ ngOnInit() {
2227
+ this.atualiza();
2228
+ }
2229
+ atualiza() {
2230
+ this.isBusy = true;
2231
+ this.ws.buscaNcm(this.frase)
2232
+ .subscribe(r => {
2233
+ this.isBusy = false;
2234
+ this.items = r;
2235
+ console.info(r);
2236
+ }, err => {
2237
+ this.isBusy = false;
2238
+ this.notification.showHttpError(err);
2239
+ });
2240
+ }
2241
+ selectItem(i) {
2242
+ if (this.selectedItem === i) {
2243
+ this.dialogRef.close(i);
2244
+ }
2245
+ this.selectedItem = i;
2246
+ }
2247
+ }
2248
+ ProdutosNcmDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosNcmDialogComponent, deps: [{ token: i3.MatDialogRef }, { token: i3.MatDialog }, { token: CommonWebService }, { token: NotificationService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
2249
+ ProdutosNcmDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutosNcmDialogComponent, selector: "app-produtos-ncm-dialog", ngImport: i0, template: "<div class=\"dialog-header\">\n <h2>Sele\u00E7\u00E3o de Grupos</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)]=\"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 </div>\n </div>\n </div>\n <div class=\"dialog-content\">\n <ox-item-card [codigo]=\"i.codigo\" [nome]=\"i.descricao\" (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: 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"] }] });
2250
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosNcmDialogComponent, decorators: [{
2251
+ type: Component,
2252
+ args: [{ selector: 'app-produtos-ncm-dialog', template: "<div class=\"dialog-header\">\n <h2>Sele\u00E7\u00E3o de Grupos</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)]=\"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 </div>\n </div>\n </div>\n <div class=\"dialog-content\">\n <ox-item-card [codigo]=\"i.codigo\" [nome]=\"i.descricao\" (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"] }]
2253
+ }], ctorParameters: function () { return [{ type: i3.MatDialogRef }, { type: i3.MatDialog }, { type: CommonWebService }, { type: NotificationService }, { type: ScreenHelperService }]; } });
2254
+
2255
+ class ProdutoSubgrupoAddDialogComponent {
2256
+ constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
2257
+ this.ws = ws;
2258
+ this.notification = notification;
2259
+ this.dataDialog = dataDialog;
2260
+ this.dialog = dialog;
2261
+ this.elRef = elRef;
2262
+ this.dialogRef = dialogRef;
2263
+ this.screenHelper = screenHelper;
2264
+ this.isBusy = false;
2265
+ this.focus = new FocusService();
2266
+ this.model = {
2267
+ id: 0,
2268
+ nome: '',
2269
+ isAtivo: true,
2270
+ enviadoPC: false
2271
+ };
2272
+ this.mobile = this.screenHelper.isMedium;
2273
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
2274
+ }
2275
+ ngOnInit() {
2276
+ this.focus.registerElement(this.elRef.nativeElement);
2277
+ }
2278
+ ngOnDestroy() {
2279
+ this.focus.unregisterElement(this.elRef.nativeElement);
2280
+ }
2281
+ salvar() {
2282
+ if (!this.model)
2283
+ return;
2284
+ const valMsg = valida(this.model, this.focus);
2285
+ if (valMsg) {
2286
+ this.notification.showMsgError(valMsg);
2287
+ return;
2288
+ }
2289
+ this.isBusy = true;
2290
+ this.ws.addProdutoSubgrupo(this.model)
2291
+ .subscribe(r => {
2292
+ this.isBusy = false;
2293
+ this.notification.showMsg("Salvo com sucesso.");
2294
+ if (this.dialogRef)
2295
+ this.dialogRef.close(true);
2296
+ }, err => {
2297
+ this.isBusy = false;
2298
+ this.notification.showMsg(err.error);
2299
+ });
2300
+ }
2301
+ }
2302
+ ProdutoSubgrupoAddDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSubgrupoAddDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
2303
+ ProdutoSubgrupoAddDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoSubgrupoAddDialogComponent, selector: "app-produto-subgrupo-add-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Novo Subgrupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>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.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: ProdutoGrupoFormComponent, selector: "app-produto-grupo-form", inputs: ["model"] }] });
2304
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSubgrupoAddDialogComponent, decorators: [{
2305
+ type: Component,
2306
+ args: [{ selector: 'app-produto-subgrupo-add-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Novo Subgrupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>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"] }]
2307
+ }], ctorParameters: function () {
2308
+ return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
2309
+ type: Inject,
2310
+ args: [MAT_DIALOG_DATA]
2311
+ }] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }];
2312
+ } });
2313
+
2314
+ class ProdutoSubgrupoEditDialogComponent {
2315
+ constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
2316
+ this.ws = ws;
2317
+ this.notification = notification;
2318
+ this.dataDialog = dataDialog;
2319
+ this.dialog = dialog;
2320
+ this.elRef = elRef;
2321
+ this.dialogRef = dialogRef;
2322
+ this.screenHelper = screenHelper;
2323
+ this.isBusy = false;
2324
+ this.focus = new FocusService();
2325
+ if (dataDialog) {
2326
+ this.model = dataDialog;
2327
+ }
2328
+ this.mobile = this.screenHelper.isMedium;
2329
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
2330
+ }
2331
+ ngOnInit() {
2332
+ this.focus.registerElement(this.elRef.nativeElement);
2333
+ }
2334
+ ngOnDestroy() {
2335
+ this.focus.unregisterElement(this.elRef.nativeElement);
2336
+ }
2337
+ salvar() {
2338
+ if (!this.model)
2339
+ return;
2340
+ const valMsg = valida(this.model, this.focus);
2341
+ if (valMsg) {
2342
+ this.notification.showMsgError(valMsg);
2343
+ return;
2344
+ }
2345
+ this.isBusy = true;
2346
+ this.ws.saveProdutoSubgrupo(this.model)
2347
+ .subscribe(r => {
2348
+ this.isBusy = false;
2349
+ this.notification.showMsg("Salvo com sucesso.");
2350
+ if (this.dialogRef)
2351
+ this.dialogRef.close(true);
2352
+ }, err => {
2353
+ this.isBusy = false;
2354
+ this.notification.showMsg(err.error);
2355
+ });
2356
+ }
2357
+ }
2358
+ ProdutoSubgrupoEditDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSubgrupoEditDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
2359
+ ProdutoSubgrupoEditDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoSubgrupoEditDialogComponent, selector: "app-produto-subgrupo-edit-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Subgrupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>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.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: ProdutoGrupoFormComponent, selector: "app-produto-grupo-form", inputs: ["model"] }] });
2360
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSubgrupoEditDialogComponent, decorators: [{
2361
+ type: Component,
2362
+ args: [{ selector: 'app-produto-subgrupo-edit-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Subgrupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>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"] }]
2363
+ }], ctorParameters: function () {
2364
+ return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
2365
+ type: Inject,
2366
+ args: [MAT_DIALOG_DATA]
2367
+ }] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }];
2368
+ } });
2369
+
2370
+ class ProdutoSubgrupoSelecaoDialogComponent {
2371
+ constructor(dialogRef, dialog, ws, notification, auth, screenHelper) {
2372
+ this.dialogRef = dialogRef;
2373
+ this.dialog = dialog;
2374
+ this.ws = ws;
2375
+ this.notification = notification;
2376
+ this.screenHelper = screenHelper;
2377
+ this.items = [];
2378
+ this.selectedItem = null;
2379
+ this.isBusy = false;
2380
+ this.setting = new SearchSetting();
2381
+ this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
2382
+ this.nav = new NavegacaoSelecaoDialogUtil(this);
2383
+ this.mobile = this.screenHelper.isMedium;
2384
+ this.allowAdd = auth.permissoes.adminProdutoGrupoAdd;
2385
+ this.allowEdit = auth.permissoes.adminProdutoGrupoPesquisa;
2386
+ }
2387
+ ngOnInit() {
2388
+ this.setting.ordem = "nome";
2389
+ this.atualiza();
2390
+ }
2391
+ atualiza() {
2392
+ this.isBusy = true;
2393
+ this.ws.buscaProdutoSubgrupo(this.setting)
2394
+ .subscribe(r => {
2395
+ this.isBusy = false;
2396
+ this.items = r;
2397
+ console.info(r);
2398
+ }, err => {
2399
+ this.isBusy = false;
2400
+ this.notification.showHttpError(err);
2401
+ });
2402
+ }
2403
+ selectItem(i) {
2404
+ if (this.selectedItem === i) {
2405
+ this.dialogRef.close(i);
2406
+ }
2407
+ this.selectedItem = i;
2408
+ }
2409
+ novo() {
2410
+ let height = (window.innerHeight * 0.90) + 'px';
2411
+ let width = 550 + 'px';
2412
+ if (this.mobile) {
2413
+ width = (window.innerWidth * 0.99) + 'px';
2414
+ //height = (window.innerHeight * 0.98) + 'px';
2415
+ }
2416
+ const dialog = this.dialog.open(ProdutoSubgrupoAddDialogComponent, {
2417
+ width: width,
2418
+ height: height,
2419
+ maxWidth: '100%',
2420
+ panelClass: 'dialog-p0',
2421
+ });
2422
+ dialog.afterClosed().subscribe(result => {
2423
+ if (result === undefined)
2424
+ return;
2425
+ this.notification.showMsg("Salvo com sucesso.");
2426
+ this.atualiza();
2427
+ });
2428
+ }
2429
+ editar() {
2430
+ let height = (window.innerHeight * 0.90) + 'px';
2431
+ let width = 550 + 'px';
2432
+ if (this.mobile) {
2433
+ width = (window.innerWidth * 0.99) + 'px';
2434
+ //height = (window.innerHeight * 0.98) + 'px';
2435
+ }
2436
+ const dialog = this.dialog.open(ProdutoSubgrupoEditDialogComponent, {
2437
+ width: width,
2438
+ height: height,
2439
+ maxWidth: '100%',
2440
+ panelClass: 'dialog-p0',
2441
+ data: this.selectedItem
2442
+ });
2443
+ dialog.afterClosed().subscribe(result => {
2444
+ if (result === undefined)
2445
+ return;
2446
+ this.notification.showMsg("Salvo com sucesso.");
2447
+ this.atualiza();
2448
+ });
2449
+ }
2450
+ }
2451
+ ProdutoSubgrupoSelecaoDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSubgrupoSelecaoDialogComponent, deps: [{ token: i3.MatDialogRef }, { token: i3.MatDialog }, { token: CommonWebService }, { token: NotificationService }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
2452
+ ProdutoSubgrupoSelecaoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoSubgrupoSelecaoDialogComponent, selector: "app-produto-subgrupo-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 == 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>\n ", 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"] }] });
2453
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSubgrupoSelecaoDialogComponent, decorators: [{
2454
+ type: Component,
2455
+ args: [{ selector: 'app-produto-subgrupo-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 == 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>\n ", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
2456
+ }], ctorParameters: function () { return [{ type: i3.MatDialogRef }, { type: i3.MatDialog }, { type: CommonWebService }, { type: NotificationService }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
2457
+
2458
+ const lateralAnimation = trigger('menuLateral', [
2459
+ transition(':enter', [
2460
+ style({ opacity: 0 }),
2461
+ animate('600ms', style({ 'opacity': 1 }))
2462
+ ])
2463
+ ]);
2464
+ class ProdutoFormComponent {
2465
+ constructor(dialog, ws, http, auth, notification, screenHelper) {
2466
+ this.dialog = dialog;
2467
+ this.ws = ws;
2468
+ this.http = http;
2469
+ this.auth = auth;
2470
+ this.notification = notification;
2471
+ this.screenHelper = screenHelper;
2472
+ this.cfopList = [
2473
+ { item1: '5101', item2: 'Venda de produção do estabelecimento' },
2474
+ { item1: '5102', item2: 'Venda de mercadoria adquirida ou recebida de terceiros' },
2475
+ { item1: '5405', item2: 'Venda de mercadoria, adquirida ou recebida de terceiros, sujeita ao regime de substituição tributária, na condição de contribuinte-substituído' },
2476
+ { item1: '5933', item2: 'Serviço' },
2477
+ ];
2478
+ this.stList = [
2479
+ { item1: 'F', item2: 'Subs. Trib.' },
2480
+ { item1: 'I', item2: 'Isento' },
2481
+ { item1: 'N', item2: 'Não Tributado' },
2482
+ { item1: 'Q', item2: 'Isento ISSQN' },
2483
+ { item1: 'S', item2: 'Tributado ISSQN' },
2484
+ { item1: 'T', item2: 'Tributado ICMS' },
2485
+ ];
2486
+ this.modBaseICMS = [
2487
+ { item1: 0, item2: 'Margem Valor Agregado (%)' },
2488
+ { item1: 1, item2: 'Pauta (Valor)' },
2489
+ { item1: 2, item2: 'Preço Tabelado Máx. (valor)' },
2490
+ { item1: 3, item2: 'Valor da operação' },
2491
+ ];
2492
+ this.cstICMSList = [
2493
+ { item1: '00', item2: 'Tributada integralmente' },
2494
+ { item1: '10', item2: 'Tributada e com cobrança do ICMS por substituição tributária' },
2495
+ { item1: '20', item2: 'Com redução de base de cálculo' },
2496
+ { item1: '30', item2: 'Isenta ou não tributada e com cobrança do ICMS por substituição tributária' },
2497
+ { item1: '40', item2: 'Isenta' },
2498
+ { item1: '41', item2: 'Não tributada' },
2499
+ { item1: '50', item2: 'Suspensão' },
2500
+ { item1: '51', item2: 'Diferimento' },
2501
+ { item1: '60', item2: 'ICMS cobrado anteriormente por substituição tributária' },
2502
+ { item1: '70', item2: 'Com redução de base de cálculo e cobrança do ICMS por substituição tributária' },
2503
+ { item1: '90', item2: 'Outros' },
2504
+ { item1: '101', item2: 'Tributada pelo Simples Nacional com permissão de crédito' },
2505
+ { item1: '102', item2: 'Tributada pelo Simples Nacional sem permissão de crédito' },
2506
+ { item1: '103', item2: 'Isenção do ICMS no Simples Nacional para faixa de receita bruta' },
2507
+ { item1: '300', item2: 'Imune' },
2508
+ { item1: '400', item2: 'Não tributada pelo Simples Nacional' },
2509
+ { item1: '201', item2: 'Tributada pelo Simples Nacional com permissão de crédito e com cobrança do ICMS por Substituição Tributária' },
2510
+ { item1: '202', item2: 'Tributada pelo Simples Nacional sem permissão de crédito e com cobrança do ICMS por Substituição Tributária' },
2511
+ { item1: '203', item2: 'Isenção do ICMS nos Simples Nacional para faixa de receita bruta e com cobrança do ICMS por Substituição Tributária' },
2512
+ { item1: '500', item2: 'ICMS cobrado anteriormente por substituição tributária (substituído) ou por antecipação' },
2513
+ { item1: '900', item2: 'Outros' }
2514
+ ];
2515
+ this.cstCofinsList = [
2516
+ { item1: '01', item2: ' Operação Tributável (base de cálculo = valor da operação alíquota normal (cumulativo/não cumulativo));' },
2517
+ { item1: '02', item2: ' Operação Tributável (base de cálculo = valor da operação (alíquota diferenciada));' },
2518
+ { item1: '03', item2: ' Operação Tributável (base de cálculo = quantidade vendida x alíquota por unidade de produto);' },
2519
+ { item1: '04', item2: ' Operação Tributável (tributação monofásica (alíquota zero));' },
2520
+ { item1: '05', item2: ' Operação Tributável (Substituição Tributária);' },
2521
+ { item1: '06', item2: ' Operação Tributável (alíquota zero);' },
2522
+ { item1: '07', item2: ' Operação Isenta da Contribuição;' },
2523
+ { item1: '08', item2: ' Operação Sem Incidência da Contribuição;' },
2524
+ { item1: '09', item2: ' Operação com Suspensão da Contribuição;' },
2525
+ { item1: '99', item2: ' Outras Operações;' },
2526
+ { item1: '49', item2: ' Outras Operações de Saída; ' },
2527
+ { item1: '50', item2: ' Operação com Direito a Crédito Vinculada Exclusivamente a Receita Tributada no Mercado Interno; ' },
2528
+ { item1: '51', item2: ' Operação com Direito a Crédito Vinculada Exclusivamente a Receita Não Tributada no Mercado Interno ;' },
2529
+ { item1: '52', item2: ' Operação com Direito a Crédito Vinculada Exclusivamente a Receita de Exportação; ' },
2530
+ { item1: '53', item2: ' Operação com Direito a Crédito Vinculada a Receitas Tributadas e NãoTributadas no Mercado Interno; ' },
2531
+ { item1: '54', item2: ' Operação com Direito a Crédito Vinculada a Receitas Tributadas no Mercado Interno e de Exportação ;' },
2532
+ { item1: '55', item2: ' Operação com Direito a Crédito Vinculada a Receitas NãoTributadas no Mercado Interno e de Exportação; ' },
2533
+ { item1: '56', item2: ' Operação com Direito a Crédito Vinculada a Receitas Tributadas e NãoTributadas no Mercado Interno, e de Exportação;' },
2534
+ { item1: '60', item2: ' Crédito Presumido Operação de Aquisição Vinculada Exclusivamente a Receita Tributada no Mercado Interno; ' },
2535
+ { item1: '61', item2: ' Crédito Presumido Operação de Aquisição Vinculada Exclusivamente a Receita Não Tributada no Mercado Interno; ' },
2536
+ { item1: '62', item2: ' Crédito Presumido Operação de Aquisição Vinculada Exclusivamente a Receita de Exportação; ' },
2537
+ { item1: '63', item2: ' Crédito Presumido Operação de Aquisição Vinculada a Receitas Tributadas e NãoTributadas no Mercado Interno; ' },
2538
+ { item1: '64', item2: ' Crédito Presumido Operação de Aquisição Vinculada a Receitas Tributadas no Mercado Interno e de Exportação; ' },
2539
+ { item1: '65', item2: ' Crédito Presumido Operação de Aquisição Vinculada a Receitas NãoTributadas no Mercado Interno e de Exportação; ' },
2540
+ { item1: '66', item2: ' Crédito Presumido Operação de Aquisição Vinculada a Receitas Tributadas e NãoTributadas no Mercado Interno, e de Exportação; ' },
2541
+ { item1: '67', item2: ' Crédito Presumido Outras Operações; ' },
2542
+ { item1: '70', item2: ' Operação de Aquisição sem Direito a Crédito; ' },
2543
+ { item1: '71', item2: ' Operação de Aquisição com Isenção; ' },
2544
+ { item1: '72', item2: ' Operação de Aquisição com Suspensão; ' },
2545
+ { item1: '73', item2: ' Operação de Aquisição a Alíquota Zero; ' },
2546
+ { item1: '74', item2: ' Operação de Aquisição sem Incidência da Contribuição; ' },
2547
+ { item1: '75', item2: ' Operação de Aquisição por Substituição Tributária;' },
2548
+ { item1: '98', item2: ' Outras Operações de Entrada;' },
2549
+ ];
2550
+ this.ncmEncontrado = false;
2551
+ this.ncmNaoEncontrado = false;
2552
+ this.isBusy = false;
2553
+ this.pRedBCEfet_icmsParser = new NumberParser(v => this.model.pRedBCEfet_icms = v, () => this.model.pRedBCEfet_icms);
2554
+ this.picmsEfet_icmsParser = new NumberParser(v => this.model.picmsEfet_icms = v, () => this.model.picmsEfet_icms);
2555
+ this.vbcEfet_icmsParser = new NumberParser(v => this.model.vbcEfet_icms = v, () => this.model.vbcEfet_icms);
2556
+ this.vicmsEfet_icmsParser = new NumberParser(v => this.model.vicmsEfet_icms = v, () => this.model.vicmsEfet_icms);
2557
+ this.psT_icmsParser = new NumberParser(v => this.model.psT_icms = v, () => this.model.psT_icms);
2558
+ this.vbcstRet_icmsParser = new NumberParser(v => this.model.vbcstRet_icms = v, () => this.model.vbcstRet_icms);
2559
+ this.vicmsSubstituto_icmsParser = new NumberParser(v => this.model.vicmsSubstituto_icms = v, () => this.model.vicmsSubstituto_icms);
2560
+ this.vicmsstRet_icmsParser = new NumberParser(v => this.model.vicmsstRet_icms = v, () => this.model.vicmsstRet_icms);
2561
+ this.pfcP_icmsParser = new NumberParser(v => this.model.pfcP_icms = v, () => this.model.pfcP_icms);
2562
+ this.vbcfcP_icmsParser = new NumberParser(v => this.model.vbcfcP_icms = v, () => this.model.vbcfcP_icms);
2563
+ this.pfcpsT_icmsParser = new NumberParser(v => this.model.pfcpsT_icms = v, () => this.model.pfcpsT_icms);
2564
+ this.vbcfcpsT_icmsParser = new NumberParser(v => this.model.vbcfcpsT_icms = v, () => this.model.vbcfcpsT_icms);
2565
+ this.pfcpstRet_icmsParser = new NumberParser(v => this.model.pfcpstRet_icms = v, () => this.model.pfcpstRet_icms);
2566
+ this.vbcfcpstRet_icmsParser = new NumberParser(v => this.model.vbcfcpstRet_icms = v, () => this.model.vbcfcpstRet_icms);
2567
+ this.ppiS_pisParser = new NumberParser(v => this.model.ppiS_pis = v, () => this.model.ppiS_pis);
2568
+ this.vbC_pisParser = new NumberParser(v => this.model.vbC_pis = v, () => this.model.vbC_pis);
2569
+ this.pcofinS_cofinsParser = new NumberParser(v => this.model.pcofinS_cofins = v, () => this.model.pcofinS_cofins);
2570
+ this.vbC_cofinsParser = new NumberParser(v => this.model.vbC_cofins = v, () => this.model.vbC_cofins);
2571
+ this.precoVendaParser = new NumberParser((v) => this.model.precoVenda = v !== null && v !== void 0 ? v : 0, () => this.model.precoVenda);
2572
+ this.precoCustoParser = new NumberParser((v) => this.model.precoCusto = v !== null && v !== void 0 ? v : 0, () => this.model.precoCusto);
2573
+ this.precoFuncParser = new NumberParser((v) => this.model.precoFuncionario = v !== null && v !== void 0 ? v : 0, () => this.model.precoFuncionario);
2574
+ this.pICMS_icmsParser = new NumberParser((v) => this.model.pICMS_icms = v, () => this.model.pICMS_icms);
2575
+ this.lazyTriggerNcm = new LazyTrigger(() => { this.findNCM(); });
2576
+ this.editMode = false;
2577
+ this.nextIdClick = new EventEmitter();
2578
+ this.progress = 0;
2579
+ this.message = '';
2580
+ this._model = createProduct();
2581
+ this.tabs = [
2582
+ { name: "Campos Gerais", value: 0 },
2583
+ { name: "Campos Fiscais", value: 1 },
2584
+ { name: "Cardápio Digital", value: 2 }
2585
+ ];
2586
+ this.selectedTab = 0;
2587
+ this.setores = [];
2588
+ }
2589
+ get model() {
2590
+ return this._model;
2591
+ }
2592
+ set model(value) {
2593
+ this._model = value;
2594
+ this.setImgUrl();
2595
+ this.findNCM();
2596
+ }
2597
+ ngOnInit() {
2598
+ this.loadSetores();
2599
+ }
2600
+ loadSetores() {
2601
+ this.isBusy = true;
2602
+ this.ws.getAllSetores()
2603
+ .subscribe(r => {
2604
+ this.setores = r;
2605
+ console.info(r);
2606
+ this.isBusy = false;
2607
+ }, err => {
2608
+ this.isBusy = false;
2609
+ this.notification.showHttpError(err);
2610
+ });
2611
+ }
2612
+ editarNCM() {
2613
+ let height = (window.innerHeight * 0.95) + 'px';
2614
+ let width = 550 + 'px';
2615
+ if (this.screenHelper.mobileScreen) {
2616
+ width = (window.innerWidth * 0.99) + 'px';
2617
+ height = (window.innerHeight * 0.99) + 'px';
2618
+ }
2619
+ let dialogRef = this.dialog.open(ProdutosNcmDialogComponent, {
2620
+ height: height,
2621
+ width: width,
2622
+ maxWidth: '100%',
2623
+ panelClass: 'dialog-p0',
2624
+ });
2625
+ dialogRef.afterClosed().subscribe(result => {
2626
+ if (result == undefined)
2627
+ return;
2628
+ if (!this.model)
2629
+ return;
2630
+ this.model.ncm = result.codigoApenasDigitos;
2631
+ this.lazyTriggerNcm.fire();
2632
+ });
2633
+ }
2634
+ editarSubgrupo() {
2635
+ let height = (window.innerHeight * 0.95) + 'px';
2636
+ let width = 550 + 'px';
2637
+ if (this.screenHelper.mobileScreen) {
2638
+ width = (window.innerWidth * 0.99) + 'px';
2639
+ height = (window.innerHeight * 0.99) + 'px';
2640
+ }
2641
+ let dialogRef = this.dialog.open(ProdutoSubgrupoSelecaoDialogComponent, {
2642
+ height: height,
2643
+ width: width,
2644
+ maxWidth: '100%',
2645
+ panelClass: 'dialog-p0',
2646
+ });
2647
+ dialogRef.afterClosed().subscribe(result => {
2648
+ if (result == undefined)
2649
+ return;
2650
+ if (!this.model)
2651
+ return;
2652
+ this.model.subgrupoId = result.id;
2653
+ this.model.subgrupoNome = result.nome;
2654
+ });
2655
+ }
2656
+ editarGrupo() {
2657
+ let height = (window.innerHeight * 0.95) + 'px';
2658
+ let width = 550 + 'px';
2659
+ if (this.screenHelper.mobileScreen) {
2660
+ width = (window.innerWidth * 0.99) + 'px';
2661
+ height = (window.innerHeight * 0.99) + 'px';
2662
+ }
2663
+ let dialogRef = this.dialog.open(ProdutoGrupoSelecaoDialogComponent, {
2664
+ height: height,
2665
+ width: width,
2666
+ maxWidth: '100%',
2667
+ panelClass: 'dialog-p0',
2668
+ });
2669
+ dialogRef.afterClosed().subscribe(result => {
2670
+ if (result == undefined)
2671
+ return;
2672
+ if (!this.model)
2673
+ return;
2674
+ this.model.grupoId = result.id;
2675
+ this.model.grupoNome = result.nome;
2676
+ });
2677
+ }
2678
+ editarCategoriaCardapio() {
2679
+ let height = (window.innerHeight * 0.95) + 'px';
2680
+ let width = 550 + 'px';
2681
+ if (this.screenHelper.mobileScreen) {
2682
+ width = (window.innerWidth * 0.99) + 'px';
2683
+ height = (window.innerHeight * 0.99) + 'px';
2684
+ }
2685
+ let dialogRef = this.dialog.open(ProdutoCategoriaCardapioSelecaoDialogComponent, {
2686
+ height: height,
2687
+ width: width,
2688
+ maxWidth: '100%',
2689
+ panelClass: 'dialog-p0',
2690
+ });
2691
+ dialogRef.afterClosed().subscribe(result => {
2692
+ if (result == undefined)
2693
+ return;
2694
+ if (!this.model)
2695
+ return;
2696
+ this.model.categoriaCardapioId = result.id;
2697
+ this.model.categoriaCardapioNome = result.nome;
2698
+ });
2699
+ }
2700
+ changeModo(ev) {
2701
+ this.selectedTab = ev.value;
2702
+ }
2703
+ uploadFile(files) {
2704
+ if (!this.model)
2705
+ return;
2706
+ if (files.length === 0) {
2707
+ return;
2708
+ }
2709
+ let fileToUpload = files[0];
2710
+ const formData = new FormData();
2711
+ formData.append('file', fileToUpload, fileToUpload.name);
2712
+ this.http.post(this.ws.PRODUTO_BASE_URL + "Imagem?produtoId=" + this.model.id, formData, {
2713
+ reportProgress: true,
2714
+ observe: 'events',
2715
+ headers: {
2716
+ "Authorization": 'token ' + this.auth.token,
2717
+ }
2718
+ })
2719
+ .subscribe(event => {
2720
+ var _a;
2721
+ if (event.type === HttpEventType.UploadProgress) {
2722
+ const total = (_a = event.total) !== null && _a !== void 0 ? _a : -1;
2723
+ this.progress = Math.round(100 * event.loaded / total);
2724
+ }
2725
+ else if (event.type === HttpEventType.Response) {
2726
+ this.message = 'Sucesso';
2727
+ this.imgUrl = undefined;
2728
+ setTimeout(() => {
2729
+ this.setImgUrl(new Date().getMinutes() + "");
2730
+ }, 1000);
2731
+ }
2732
+ }, err => {
2733
+ const httpError = err;
2734
+ this.message = httpError.error;
2735
+ });
2736
+ }
2737
+ setImgUrl(upload = undefined) {
2738
+ if (!this.model)
2739
+ return;
2740
+ this.imgUrl = this.ws.MEDIA_PRODUTO_IMAGEM_URL +
2741
+ '?produtoId=' + this.model.id +
2742
+ '&token=' + this.auth.token +
2743
+ (upload !== undefined ? '&upload=' + upload : '');
2744
+ }
2745
+ findNCM() {
2746
+ this.ncmEncontrado = false;
2747
+ this.ncmNaoEncontrado = false;
2748
+ if (!this.model)
2749
+ return;
2750
+ if (!this.model.ncm)
2751
+ return;
2752
+ this.isBusy = true;
2753
+ this.ws.findNcm(this.model.ncm)
2754
+ .subscribe(r => {
2755
+ this.ncmEncontrado = r != null;
2756
+ this.ncmNaoEncontrado = r == null;
2757
+ console.info(r);
2758
+ this.isBusy = false;
2759
+ }, err => {
2760
+ this.isBusy = false;
2761
+ this.notification.showHttpError(err);
2762
+ });
2763
+ }
2764
+ }
2765
+ ProdutoFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoFormComponent, deps: [{ token: i3.MatDialog }, { token: CommonWebService }, { token: i1.HttpClient }, { token: AuthDataService }, { token: NotificationService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
2766
+ ProdutoFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoFormComponent, selector: "app-produto-form", inputs: { editMode: "editMode", model: "model" }, outputs: { nextIdClick: "nextIdClick" }, ngImport: i0, template: "<div style=\"margin-bottom: 16px\">\n <ox-radio-button-group (change)=\"changeModo($event)\" [items]=\"tabs\" class=\"tool-item-container\">\n </ox-radio-button-group>\n</div>\n<div [@menuLateral] class=\"vbox\" *ngIf=\"selectedTab == 0\">\n <div class=\"hbox\">\n <div class=\"form-group\">\n <label>C\u00F3digo</label>\n <div class=\"hbox\">\n <input id=\"id\" [attr.readonly]=\"editMode\" [(ngModel)]=\"model.id\" class=\"form-control input-120\"\n tabindex=\"2\">\n <button (click)=\"nextIdClick.emit()\" *ngIf=\"!editMode\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n lightbulb\n </span>\n </button>\n </div>\n </div>\n <div class=\"form-group margin-left-8\">\n <label>Refer\u00EAncia</label>\n <input id=\"referencia\" [(ngModel)]=\"model.referencia\" class=\"form-control input-120\" tabindex=\"2\">\n </div>\n </div>\n <div class=\"form-group\">\n <label>Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" cdkFocusInitial class=\"form-control input-300\" tabindex=\"2\">\n </div>\n <div class=\"hbox\">\n <div class=\"form-group\">\n <label>Pre\u00E7o de Venda</label>\n <input id=\"precoVenda\" [ngModel]=\"model.precoVenda | number:'1.2-2'\"\n (ngModelChange)=\"precoVendaParser.parse($event)\" (focusout)=\"precoVendaParser.checkout()\"\n class=\"form-control input-100 text-right\" tabindex=\"2\">\n </div>\n <div class=\"form-group margin-left-8\">\n <label>Pre\u00E7o p/ Func.</label>\n <input id=\"precoFuncionario\" [ngModel]=\"model.precoFuncionario | number:'1.2-2'\"\n (ngModelChange)=\"precoFuncParser.parse($event)\" (focusout)=\"precoFuncParser.checkout()\"\n class=\"form-control input-100 text-right\" tabindex=\"2\">\n </div>\n <div class=\"form-group margin-left-8\">\n <label>Pre\u00E7o de Custo</label>\n <input id=\"precoCusto\" [ngModel]=\"model.precoCusto | number:'1.2-2'\"\n (ngModelChange)=\"precoCustoParser.parse($event)\" (focusout)=\"precoCustoParser.checkout()\"\n class=\"form-control input-100 text-right\" tabindex=\"2\">\n </div>\n </div>\n <div class=\"form-group\">\n <label>Grupo</label>\n <div class=\"hbox\">\n <div id=\"grupo\" (click)=\"editarGrupo()\" class=\"form-control grow-1 input-selecao input-300\">\n {{model.grupoNome}} </div>\n <button (click)=\"editarGrupo()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n </div>\n </div>\n <div class=\"form-group\">\n <label>Subgrupo</label>\n <div class=\"hbox\">\n <div id=\"subgrupo\" (click)=\"editarSubgrupo()\" class=\"form-control grow-1 input-selecao input-300\">\n {{model.subgrupoNome}} </div>\n <button (click)=\"editarSubgrupo()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n </div>\n </div>\n\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>Unidade</label>\n <input id=\"unidade\" [(ngModel)]=\"model.unidade\" class=\"form-control input-120\">\n </div>\n <div class=\"form-group\">\n <label>Estoque Min.</label>\n <input id=\"estoqueMinimo\" [(ngModel)]=\"model.estoqueMinimo\" class=\"form-control input-120\">\n </div>\n </div>\n\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>C\u00F3digo Patrim\u00F4nio</label>\n <input id=\"codigoPatrimonio\" [(ngModel)]=\"model.codigoPatrimonio\" class=\"form-control input-120\"\n maxlength=\"36\">\n </div>\n <div class=\"form-group\">\n <label>Obs.</label>\n <input id=\"obs\" [(ngModel)]=\"model.obs\" class=\"form-control input-300\" maxlength=\"300\">\n </div>\n </div>\n \n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>Setor Subestoque</label>\n <mat-select [(value)]=\"model.setorSubEstoqueId\" class=\"form-control input-120\">\n <mat-option *ngFor=\"let i of setores\" [value]=\"i.id\">\n {{i.nome}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Qtd. Subestoque</label>\n <input id=\"qtdMinSubEstoque\" [(ngModel)]=\"model.qtdMinSubEstoque\" class=\"form-control input-120 text-right\">\n </div>\n </div>\n <div class=\"vbox\">\n <mat-slide-toggle [(ngModel)]=\"model.estoqueControlado\" tabindex=-1>Controlado no Estoque</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.imprimiCozinha\" tabindex=-1>Imprime Cozinha</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.imprimeCorredor\" tabindex=-1>Imprime Corredor</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.verNaRecepcao\" tabindex=-1>Ver na Recep\u00E7\u00E3o</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.omiteCliente\" tabindex=-1>N\u00E3o Exibe para o Cliente na Sa\u00EDda\n </mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.isAtivo\" tabindex=-1>Ativado</mat-slide-toggle>\n </div>\n\n</div>\n\n<div [@menuLateral] class=\"vbox\" *ngIf=\"selectedTab == 1\">\n\n <div style=\"margin-bottom: 16px;\" class=\"vbox\">\n <mat-slide-toggle [(ngModel)]=\"model.emiteNFCe\" tabindex=-1>Emite Fiscal\n </mat-slide-toggle>\n </div>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>GTIN</label>\n <input id=\"gtin\" [(ngModel)]=\"model.gtin\" class=\"form-control input-120\" placeholder=\"SEM GTIN\"\n maxlength=\"14\">\n </div>\n <div class=\"form-group\">\n <label>CFOP</label>\n <input id=\"cfop\" [(ngModel)]=\"model.cfop\" [matAutocomplete]=\"auto\" matInput class=\"form-control input-100\"\n maxlength=\"4\">\n <mat-autocomplete #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of cfopList\" [value]=\"option.item1\">\n {{option.item1}} <small>{{option.item2}}</small>\n </mat-option>\n </mat-autocomplete>\n </div>\n <div class=\"form-group\">\n <label>NCM</label>\n <div class=\"hbox\">\n <input id=\"ncm\" (input)=\"lazyTriggerNcm.fire()\" [(ngModel)]=\"model.ncm\" class=\"form-control input-100\"\n maxlength=\"8\">\n <button (click)=\"editarNCM()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n <span class=\"badge buscando\" *ngIf=\"isBusy\">Buscando...</span>\n <span class=\"badge encontrado\" *ngIf=\"ncmEncontrado\">Encontrado</span>\n <span class=\"badge nao-encontrado\" *ngIf=\"ncmNaoEncontrado\">N\u00E3o encontrado</span>\n </div>\n </div>\n </div>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CEST</label>\n <input id=\"cest\" [(ngModel)]=\"model.cest\" autocomplete=\"off\" class=\"form-control input-120\" maxlength=\"7\">\n </div>\n <div class=\"form-group\">\n <label>ICMS (ECF/SAT)</label>\n <input id=\"aliquotaICMS\" [(ngModel)]=\"model.aliquotaICMS\" autocomplete=\"off\" class=\"form-control input-100 text-right\"\n maxlength=\"5\">\n </div>\n <div class=\"form-group\">\n <label>S. T. (ECF/SAT)</label>\n <input id=\"sitTrib\" [(ngModel)]=\"model.sitTrib\" autocomplete=\"off\" [matAutocomplete]=\"autoST\" matInput\n class=\"form-control input-120\" maxlength=\"5\">\n <mat-autocomplete #autoST=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of stList\" [value]=\"option.item1\">\n {{option.item1}} <small>{{option.item2}}</small>\n </mat-option>\n </mat-autocomplete>\n </div>\n </div>\n <h4>Campos da NFC-e</h4>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CST/CSOSN</label>\n <mat-select [(value)]=\"model.csT_icms\" class=\"form-control input-120\">\n <mat-option *ngFor=\"let i of cstICMSList\" [value]=\"i.item1\">\n {{i.item1}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Aliq. ICMS (%)</label>\n <input id=\"pICMS_icms\" [ngModel]=\"model.pICMS_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pICMS_icmsParser.parse($event)\" (focusout)=\"pICMS_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>Modalidade BC</label>\n <mat-select [(value)]=\"model.modBC_icms\" class=\"form-control input-120\">\n <mat-option *ngFor=\"let i of modBaseICMS\" [value]=\"i.item1\">\n {{i.item1}} <small>{{i.item2}}</small>\n </mat-option>\n </mat-select>\n </div>\n </div>\n <h6>ICMS Efetivo CST60/CSOSN500</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>pRedBCEfet (%)</label>\n <input id=\"pRedBCEfet_icms\" [ngModel]=\"model.pRedBCEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pRedBCEfet_icmsParser.parse($event)\" (focusout)=\"pRedBCEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>pICMSEfet (%)</label>\n <input id=\"picmsEfet_icms\" [ngModel]=\"model.picmsEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"picmsEfet_icmsParser.parse($event)\" (focusout)=\"picmsEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCEfet (R$)</label>\n <input id=\"vbcEfet_icms\" [ngModel]=\"model.vbcEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcEfet_icmsParser.parse($event)\" (focusout)=\"vbcEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vICMSEfet (R$)</label>\n <input id=\"vicmsEfet_icms\" [ngModel]=\"model.vicmsEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vicmsEfet_icmsParser.parse($event)\" (focusout)=\"vicmsEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n <h6>Substitui\u00E7\u00E3o Tribut\u00E1ria (ST)</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>pST (%)</label>\n <input id=\"psT_icms\" [ngModel]=\"model.psT_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"psT_icmsParser.parse($event)\" (focusout)=\"psT_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCSTRet (R$)</label>\n <input id=\"vbcstRet_icms\" [ngModel]=\"model.vbcstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcstRet_icmsParser.parse($event)\" (focusout)=\"vbcstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vICMSSubs (R$)</label>\n <input id=\"vicmsSubstituto_icms\" [ngModel]=\"model.vicmsSubstituto_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vicmsSubstituto_icmsParser.parse($event)\"\n (focusout)=\"vicmsSubstituto_icmsParser.checkout()\" class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vICMSSTRet (R$)</label>\n <input id=\"vicmsstRet_icms\" [ngModel]=\"model.vicmsstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vicmsstRet_icmsParser.parse($event)\" (focusout)=\"vicmsstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n <h6>Fundo de Combate a Pobresa</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>pFCP (%)</label>\n <input id=\"pfcP_icms\" [ngModel]=\"model.pfcP_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pfcP_icmsParser.parse($event)\" (focusout)=\"pfcP_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCFCP (R$)</label>\n <input id=\"vbcfcP_icms\" [ngModel]=\"model.vbcfcP_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcfcP_icmsParser.parse($event)\" (focusout)=\"vbcfcP_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>pFCPST (%)</label>\n <input id=\"pfcpsT_icms\" [ngModel]=\"model.pfcpsT_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pfcpsT_icmsParser.parse($event)\" (focusout)=\"pfcpsT_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCFCPST (R$)</label>\n <input id=\"vbcfcpsT_icms\" [ngModel]=\"model.vbcfcpsT_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcfcpsT_icmsParser.parse($event)\" (focusout)=\"vbcfcpsT_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>pFCPSTRet (%)</label>\n <input id=\"pfcpstRet_icms\" [ngModel]=\"model.pfcpstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pfcpstRet_icmsParser.parse($event)\" (focusout)=\"pfcpstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCFCPSTRet (R$)</label>\n <input id=\"vbcfcpstRet_icms\" [ngModel]=\"model.vbcfcpstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcfcpstRet_icmsParser.parse($event)\" (focusout)=\"vbcfcpstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n <h6>PIS</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CST/PIS</label>\n <mat-select [(value)]=\"model.csT_pis\" class=\"form-control input-120\">\n <mat-option [value]=\"null\">\n Nenhum\n </mat-option>\n <mat-option *ngFor=\"let i of cstCofinsList\" [value]=\"i.item1\">\n {{i.item1}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Aliquota PIS (%)</label>\n <input id=\"ppiS_pis\" [ngModel]=\"model.ppiS_pis | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"ppiS_pisParser.parse($event)\" (focusout)=\"ppiS_pisParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>PIS BC %</label>\n <input id=\"vbC_pis\" [ngModel]=\"model.vbC_pis | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbC_pisParser.parse($event)\" (focusout)=\"vbC_pisParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n \n <h6>COFINS</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CST/COFINS</label>\n <mat-select [(value)]=\"model.csT_cofins\" class=\"form-control input-120\">\n <mat-option [value]=\"null\">\n Nenhum\n </mat-option>\n <mat-option *ngFor=\"let i of cstCofinsList\" [value]=\"i.item1\">\n {{i.item1}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Aliq. COFINS (%)</label>\n <input id=\"pcofinS_cofins\" [ngModel]=\"model.pcofinS_cofins | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pcofinS_cofinsParser.parse($event)\" (focusout)=\"pcofinS_cofinsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>COFINS BC %</label>\n <input id=\"vbC_cofins\" [ngModel]=\"model.vbC_cofins | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbC_cofinsParser.parse($event)\" (focusout)=\"vbC_cofinsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n</div>\n\n<div [@menuLateral] class=\"vbox\" *ngIf=\"selectedTab == 2\">\n\n <div style=\"margin-bottom: 16px;\" class=\"vbox\">\n <mat-slide-toggle [(ngModel)]=\"model.disponivelCardapio\" tabindex=-1>Dispon\u00EDvel no Card\u00E1pio Digital\n </mat-slide-toggle>\n </div>\n <div class=\"form-group\">\n <label>Descri\u00E7\u00E3o</label>\n <textarea id=\"descricao\" [(ngModel)]=\"model.descricao\" cols=\"40\" rows=\"5\" class=\"form-control input-300\"\n tabindex=\"2\"></textarea>\n </div>\n <div class=\"form-group\">\n <label>Categoria</label>\n <div class=\"hbox\">\n <div id=\"categoriaCardapio\" (click)=\"editarCategoriaCardapio()\"\n class=\"form-control grow-1 input-selecao input-300\">\n {{model.categoriaCardapioNome}} </div>\n <button (click)=\"editarCategoriaCardapio()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n </div>\n </div>\n <div class=\"imagem-container\" *ngIf=\"editMode\">\n <img [src]=\"imgUrl\" class=\"img-fluid\" *ngIf=\"imgUrl\" />\n\n <input type=\"file\" #file placeholder=\"Choose file\" (change)=\"uploadFile(file.files)\" accept=\".jpg,.png\"\n style=\"display: none;\">\n\n <button mat-button color=\"primary\" type=\"button\" (click)=\"file.click()\">Escolher Imagem</button>\n\n <span class=\"upload\" *ngIf=\"progress > 0\">\n {{progress}}%\n </span>\n <span class=\"upload\" *ngIf=\"message\">\n {{message}}\n </span>\n </div>\n\n</div>", styles: [".imagem-container{border:1px solid #ced4da;display:flex;flex-direction:column;border-radius:9px;max-width:460px}small{font-size:xx-small}.badge{color:#fff;font-size:xx-small;display:flex;align-items:center;padding:4px;border-radius:13px;margin-left:2px}.badge.encontrado{background:#05a301;border:1px solid #28d112}.badge.nao-encontrado{background:#a30101;border:1px solid #d17812}.badge.buscando{background:#929292;border:1px solid #a3a3a3}h6{margin:8px 0;color:#666}\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.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: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i12.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i12.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: RadioButtonGroupComponent, selector: "ox-radio-button-group", inputs: ["selectedItem", "items"], outputs: ["change"] }, { kind: "pipe", type: i6.DecimalPipe, name: "number" }], animations: [lateralAnimation] });
2767
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoFormComponent, decorators: [{
2768
+ type: Component,
2769
+ args: [{ selector: 'app-produto-form', animations: [lateralAnimation], template: "<div style=\"margin-bottom: 16px\">\n <ox-radio-button-group (change)=\"changeModo($event)\" [items]=\"tabs\" class=\"tool-item-container\">\n </ox-radio-button-group>\n</div>\n<div [@menuLateral] class=\"vbox\" *ngIf=\"selectedTab == 0\">\n <div class=\"hbox\">\n <div class=\"form-group\">\n <label>C\u00F3digo</label>\n <div class=\"hbox\">\n <input id=\"id\" [attr.readonly]=\"editMode\" [(ngModel)]=\"model.id\" class=\"form-control input-120\"\n tabindex=\"2\">\n <button (click)=\"nextIdClick.emit()\" *ngIf=\"!editMode\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n lightbulb\n </span>\n </button>\n </div>\n </div>\n <div class=\"form-group margin-left-8\">\n <label>Refer\u00EAncia</label>\n <input id=\"referencia\" [(ngModel)]=\"model.referencia\" class=\"form-control input-120\" tabindex=\"2\">\n </div>\n </div>\n <div class=\"form-group\">\n <label>Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" cdkFocusInitial class=\"form-control input-300\" tabindex=\"2\">\n </div>\n <div class=\"hbox\">\n <div class=\"form-group\">\n <label>Pre\u00E7o de Venda</label>\n <input id=\"precoVenda\" [ngModel]=\"model.precoVenda | number:'1.2-2'\"\n (ngModelChange)=\"precoVendaParser.parse($event)\" (focusout)=\"precoVendaParser.checkout()\"\n class=\"form-control input-100 text-right\" tabindex=\"2\">\n </div>\n <div class=\"form-group margin-left-8\">\n <label>Pre\u00E7o p/ Func.</label>\n <input id=\"precoFuncionario\" [ngModel]=\"model.precoFuncionario | number:'1.2-2'\"\n (ngModelChange)=\"precoFuncParser.parse($event)\" (focusout)=\"precoFuncParser.checkout()\"\n class=\"form-control input-100 text-right\" tabindex=\"2\">\n </div>\n <div class=\"form-group margin-left-8\">\n <label>Pre\u00E7o de Custo</label>\n <input id=\"precoCusto\" [ngModel]=\"model.precoCusto | number:'1.2-2'\"\n (ngModelChange)=\"precoCustoParser.parse($event)\" (focusout)=\"precoCustoParser.checkout()\"\n class=\"form-control input-100 text-right\" tabindex=\"2\">\n </div>\n </div>\n <div class=\"form-group\">\n <label>Grupo</label>\n <div class=\"hbox\">\n <div id=\"grupo\" (click)=\"editarGrupo()\" class=\"form-control grow-1 input-selecao input-300\">\n {{model.grupoNome}} </div>\n <button (click)=\"editarGrupo()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n </div>\n </div>\n <div class=\"form-group\">\n <label>Subgrupo</label>\n <div class=\"hbox\">\n <div id=\"subgrupo\" (click)=\"editarSubgrupo()\" class=\"form-control grow-1 input-selecao input-300\">\n {{model.subgrupoNome}} </div>\n <button (click)=\"editarSubgrupo()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n </div>\n </div>\n\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>Unidade</label>\n <input id=\"unidade\" [(ngModel)]=\"model.unidade\" class=\"form-control input-120\">\n </div>\n <div class=\"form-group\">\n <label>Estoque Min.</label>\n <input id=\"estoqueMinimo\" [(ngModel)]=\"model.estoqueMinimo\" class=\"form-control input-120\">\n </div>\n </div>\n\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>C\u00F3digo Patrim\u00F4nio</label>\n <input id=\"codigoPatrimonio\" [(ngModel)]=\"model.codigoPatrimonio\" class=\"form-control input-120\"\n maxlength=\"36\">\n </div>\n <div class=\"form-group\">\n <label>Obs.</label>\n <input id=\"obs\" [(ngModel)]=\"model.obs\" class=\"form-control input-300\" maxlength=\"300\">\n </div>\n </div>\n \n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>Setor Subestoque</label>\n <mat-select [(value)]=\"model.setorSubEstoqueId\" class=\"form-control input-120\">\n <mat-option *ngFor=\"let i of setores\" [value]=\"i.id\">\n {{i.nome}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Qtd. Subestoque</label>\n <input id=\"qtdMinSubEstoque\" [(ngModel)]=\"model.qtdMinSubEstoque\" class=\"form-control input-120 text-right\">\n </div>\n </div>\n <div class=\"vbox\">\n <mat-slide-toggle [(ngModel)]=\"model.estoqueControlado\" tabindex=-1>Controlado no Estoque</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.imprimiCozinha\" tabindex=-1>Imprime Cozinha</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.imprimeCorredor\" tabindex=-1>Imprime Corredor</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.verNaRecepcao\" tabindex=-1>Ver na Recep\u00E7\u00E3o</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.omiteCliente\" tabindex=-1>N\u00E3o Exibe para o Cliente na Sa\u00EDda\n </mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.isAtivo\" tabindex=-1>Ativado</mat-slide-toggle>\n </div>\n\n</div>\n\n<div [@menuLateral] class=\"vbox\" *ngIf=\"selectedTab == 1\">\n\n <div style=\"margin-bottom: 16px;\" class=\"vbox\">\n <mat-slide-toggle [(ngModel)]=\"model.emiteNFCe\" tabindex=-1>Emite Fiscal\n </mat-slide-toggle>\n </div>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>GTIN</label>\n <input id=\"gtin\" [(ngModel)]=\"model.gtin\" class=\"form-control input-120\" placeholder=\"SEM GTIN\"\n maxlength=\"14\">\n </div>\n <div class=\"form-group\">\n <label>CFOP</label>\n <input id=\"cfop\" [(ngModel)]=\"model.cfop\" [matAutocomplete]=\"auto\" matInput class=\"form-control input-100\"\n maxlength=\"4\">\n <mat-autocomplete #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of cfopList\" [value]=\"option.item1\">\n {{option.item1}} <small>{{option.item2}}</small>\n </mat-option>\n </mat-autocomplete>\n </div>\n <div class=\"form-group\">\n <label>NCM</label>\n <div class=\"hbox\">\n <input id=\"ncm\" (input)=\"lazyTriggerNcm.fire()\" [(ngModel)]=\"model.ncm\" class=\"form-control input-100\"\n maxlength=\"8\">\n <button (click)=\"editarNCM()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n <span class=\"badge buscando\" *ngIf=\"isBusy\">Buscando...</span>\n <span class=\"badge encontrado\" *ngIf=\"ncmEncontrado\">Encontrado</span>\n <span class=\"badge nao-encontrado\" *ngIf=\"ncmNaoEncontrado\">N\u00E3o encontrado</span>\n </div>\n </div>\n </div>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CEST</label>\n <input id=\"cest\" [(ngModel)]=\"model.cest\" autocomplete=\"off\" class=\"form-control input-120\" maxlength=\"7\">\n </div>\n <div class=\"form-group\">\n <label>ICMS (ECF/SAT)</label>\n <input id=\"aliquotaICMS\" [(ngModel)]=\"model.aliquotaICMS\" autocomplete=\"off\" class=\"form-control input-100 text-right\"\n maxlength=\"5\">\n </div>\n <div class=\"form-group\">\n <label>S. T. (ECF/SAT)</label>\n <input id=\"sitTrib\" [(ngModel)]=\"model.sitTrib\" autocomplete=\"off\" [matAutocomplete]=\"autoST\" matInput\n class=\"form-control input-120\" maxlength=\"5\">\n <mat-autocomplete #autoST=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of stList\" [value]=\"option.item1\">\n {{option.item1}} <small>{{option.item2}}</small>\n </mat-option>\n </mat-autocomplete>\n </div>\n </div>\n <h4>Campos da NFC-e</h4>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CST/CSOSN</label>\n <mat-select [(value)]=\"model.csT_icms\" class=\"form-control input-120\">\n <mat-option *ngFor=\"let i of cstICMSList\" [value]=\"i.item1\">\n {{i.item1}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Aliq. ICMS (%)</label>\n <input id=\"pICMS_icms\" [ngModel]=\"model.pICMS_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pICMS_icmsParser.parse($event)\" (focusout)=\"pICMS_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>Modalidade BC</label>\n <mat-select [(value)]=\"model.modBC_icms\" class=\"form-control input-120\">\n <mat-option *ngFor=\"let i of modBaseICMS\" [value]=\"i.item1\">\n {{i.item1}} <small>{{i.item2}}</small>\n </mat-option>\n </mat-select>\n </div>\n </div>\n <h6>ICMS Efetivo CST60/CSOSN500</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>pRedBCEfet (%)</label>\n <input id=\"pRedBCEfet_icms\" [ngModel]=\"model.pRedBCEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pRedBCEfet_icmsParser.parse($event)\" (focusout)=\"pRedBCEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>pICMSEfet (%)</label>\n <input id=\"picmsEfet_icms\" [ngModel]=\"model.picmsEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"picmsEfet_icmsParser.parse($event)\" (focusout)=\"picmsEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCEfet (R$)</label>\n <input id=\"vbcEfet_icms\" [ngModel]=\"model.vbcEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcEfet_icmsParser.parse($event)\" (focusout)=\"vbcEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vICMSEfet (R$)</label>\n <input id=\"vicmsEfet_icms\" [ngModel]=\"model.vicmsEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vicmsEfet_icmsParser.parse($event)\" (focusout)=\"vicmsEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n <h6>Substitui\u00E7\u00E3o Tribut\u00E1ria (ST)</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>pST (%)</label>\n <input id=\"psT_icms\" [ngModel]=\"model.psT_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"psT_icmsParser.parse($event)\" (focusout)=\"psT_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCSTRet (R$)</label>\n <input id=\"vbcstRet_icms\" [ngModel]=\"model.vbcstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcstRet_icmsParser.parse($event)\" (focusout)=\"vbcstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vICMSSubs (R$)</label>\n <input id=\"vicmsSubstituto_icms\" [ngModel]=\"model.vicmsSubstituto_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vicmsSubstituto_icmsParser.parse($event)\"\n (focusout)=\"vicmsSubstituto_icmsParser.checkout()\" class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vICMSSTRet (R$)</label>\n <input id=\"vicmsstRet_icms\" [ngModel]=\"model.vicmsstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vicmsstRet_icmsParser.parse($event)\" (focusout)=\"vicmsstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n <h6>Fundo de Combate a Pobresa</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>pFCP (%)</label>\n <input id=\"pfcP_icms\" [ngModel]=\"model.pfcP_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pfcP_icmsParser.parse($event)\" (focusout)=\"pfcP_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCFCP (R$)</label>\n <input id=\"vbcfcP_icms\" [ngModel]=\"model.vbcfcP_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcfcP_icmsParser.parse($event)\" (focusout)=\"vbcfcP_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>pFCPST (%)</label>\n <input id=\"pfcpsT_icms\" [ngModel]=\"model.pfcpsT_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pfcpsT_icmsParser.parse($event)\" (focusout)=\"pfcpsT_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCFCPST (R$)</label>\n <input id=\"vbcfcpsT_icms\" [ngModel]=\"model.vbcfcpsT_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcfcpsT_icmsParser.parse($event)\" (focusout)=\"vbcfcpsT_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>pFCPSTRet (%)</label>\n <input id=\"pfcpstRet_icms\" [ngModel]=\"model.pfcpstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pfcpstRet_icmsParser.parse($event)\" (focusout)=\"pfcpstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCFCPSTRet (R$)</label>\n <input id=\"vbcfcpstRet_icms\" [ngModel]=\"model.vbcfcpstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcfcpstRet_icmsParser.parse($event)\" (focusout)=\"vbcfcpstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n <h6>PIS</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CST/PIS</label>\n <mat-select [(value)]=\"model.csT_pis\" class=\"form-control input-120\">\n <mat-option [value]=\"null\">\n Nenhum\n </mat-option>\n <mat-option *ngFor=\"let i of cstCofinsList\" [value]=\"i.item1\">\n {{i.item1}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Aliquota PIS (%)</label>\n <input id=\"ppiS_pis\" [ngModel]=\"model.ppiS_pis | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"ppiS_pisParser.parse($event)\" (focusout)=\"ppiS_pisParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>PIS BC %</label>\n <input id=\"vbC_pis\" [ngModel]=\"model.vbC_pis | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbC_pisParser.parse($event)\" (focusout)=\"vbC_pisParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n \n <h6>COFINS</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CST/COFINS</label>\n <mat-select [(value)]=\"model.csT_cofins\" class=\"form-control input-120\">\n <mat-option [value]=\"null\">\n Nenhum\n </mat-option>\n <mat-option *ngFor=\"let i of cstCofinsList\" [value]=\"i.item1\">\n {{i.item1}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Aliq. COFINS (%)</label>\n <input id=\"pcofinS_cofins\" [ngModel]=\"model.pcofinS_cofins | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pcofinS_cofinsParser.parse($event)\" (focusout)=\"pcofinS_cofinsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>COFINS BC %</label>\n <input id=\"vbC_cofins\" [ngModel]=\"model.vbC_cofins | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbC_cofinsParser.parse($event)\" (focusout)=\"vbC_cofinsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n</div>\n\n<div [@menuLateral] class=\"vbox\" *ngIf=\"selectedTab == 2\">\n\n <div style=\"margin-bottom: 16px;\" class=\"vbox\">\n <mat-slide-toggle [(ngModel)]=\"model.disponivelCardapio\" tabindex=-1>Dispon\u00EDvel no Card\u00E1pio Digital\n </mat-slide-toggle>\n </div>\n <div class=\"form-group\">\n <label>Descri\u00E7\u00E3o</label>\n <textarea id=\"descricao\" [(ngModel)]=\"model.descricao\" cols=\"40\" rows=\"5\" class=\"form-control input-300\"\n tabindex=\"2\"></textarea>\n </div>\n <div class=\"form-group\">\n <label>Categoria</label>\n <div class=\"hbox\">\n <div id=\"categoriaCardapio\" (click)=\"editarCategoriaCardapio()\"\n class=\"form-control grow-1 input-selecao input-300\">\n {{model.categoriaCardapioNome}} </div>\n <button (click)=\"editarCategoriaCardapio()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n </div>\n </div>\n <div class=\"imagem-container\" *ngIf=\"editMode\">\n <img [src]=\"imgUrl\" class=\"img-fluid\" *ngIf=\"imgUrl\" />\n\n <input type=\"file\" #file placeholder=\"Choose file\" (change)=\"uploadFile(file.files)\" accept=\".jpg,.png\"\n style=\"display: none;\">\n\n <button mat-button color=\"primary\" type=\"button\" (click)=\"file.click()\">Escolher Imagem</button>\n\n <span class=\"upload\" *ngIf=\"progress > 0\">\n {{progress}}%\n </span>\n <span class=\"upload\" *ngIf=\"message\">\n {{message}}\n </span>\n </div>\n\n</div>", styles: [".imagem-container{border:1px solid #ced4da;display:flex;flex-direction:column;border-radius:9px;max-width:460px}small{font-size:xx-small}.badge{color:#fff;font-size:xx-small;display:flex;align-items:center;padding:4px;border-radius:13px;margin-left:2px}.badge.encontrado{background:#05a301;border:1px solid #28d112}.badge.nao-encontrado{background:#a30101;border:1px solid #d17812}.badge.buscando{background:#929292;border:1px solid #a3a3a3}h6{margin:8px 0;color:#666}\n"] }]
2770
+ }], ctorParameters: function () { return [{ type: i3.MatDialog }, { type: CommonWebService }, { type: i1.HttpClient }, { type: AuthDataService }, { type: NotificationService }, { type: ScreenHelperService }]; }, propDecorators: { editMode: [{
2771
+ type: Input
2772
+ }], nextIdClick: [{
2773
+ type: Output
2774
+ }], model: [{
2775
+ type: Input
2776
+ }] } });
2777
+
2778
+ class ProdutoAddDialogComponent {
2779
+ constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
2780
+ this.ws = ws;
2781
+ this.notification = notification;
2782
+ this.dataDialog = dataDialog;
2783
+ this.dialog = dialog;
2784
+ this.elRef = elRef;
2785
+ this.dialogRef = dialogRef;
2786
+ this.screenHelper = screenHelper;
2787
+ this.isBusy = false;
2788
+ this.focus = new FocusService();
2789
+ this.model = createProduct();
2790
+ this.mobile = this.screenHelper.isMedium;
2791
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
2792
+ }
2793
+ ngOnInit() {
2794
+ this.focus.registerElement(this.elRef.nativeElement);
2795
+ this.getNextId();
2796
+ }
2797
+ ngOnDestroy() {
2798
+ this.focus.unregisterElement(this.elRef.nativeElement);
2799
+ }
2800
+ salvar() {
2801
+ if (!this.model)
2802
+ return;
2803
+ const valMsg = valida$1(this.model, this.focus);
2804
+ if (valMsg) {
2805
+ this.notification.showMsgError(valMsg);
2806
+ return;
2807
+ }
2808
+ this.isBusy = true;
2809
+ this.ws.addProduto(this.model)
2810
+ .subscribe(r => {
2811
+ this.isBusy = false;
2812
+ this.notification.showMsg("Salvo com sucesso.");
2813
+ if (this.dialogRef)
2814
+ this.dialogRef.close(true);
2815
+ }, err => {
2816
+ this.isBusy = false;
2817
+ this.notification.showMsg(err.error);
2818
+ });
2819
+ }
2820
+ getNextId() {
2821
+ this.isBusy = true;
2822
+ this.ws.getNextIdProduto()
2823
+ .subscribe(r => {
2824
+ this.model.id = r;
2825
+ this.model.referencia = '' + r;
2826
+ this.isBusy = false;
2827
+ }, err => {
2828
+ this.isBusy = false;
2829
+ this.notification.showMsg(err.error);
2830
+ });
2831
+ }
2832
+ }
2833
+ ProdutoAddDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoAddDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
2834
+ ProdutoAddDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoAddDialogComponent, selector: "app-produto-add-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Novo Produto</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-form (nextIdClick)=\"getNextId()\" [model]=\"model\" *ngIf=\"model\"></app-produto-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>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.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: ProdutoFormComponent, selector: "app-produto-form", inputs: ["editMode", "model"], outputs: ["nextIdClick"] }] });
2835
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoAddDialogComponent, decorators: [{
2836
+ type: Component,
2837
+ args: [{ selector: 'app-produto-add-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Novo Produto</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-form (nextIdClick)=\"getNextId()\" [model]=\"model\" *ngIf=\"model\"></app-produto-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>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"] }]
2838
+ }], ctorParameters: function () {
2839
+ return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
2840
+ type: Inject,
2841
+ args: [MAT_DIALOG_DATA]
2842
+ }] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }];
2843
+ } });
2844
+
2845
+ class ProdutoBuscaFiltrosDialogComponent {
2846
+ constructor(d, ws, notification, dialogRef) {
2847
+ this.d = d;
2848
+ this.ws = ws;
2849
+ this.notification = notification;
2850
+ this.dialogRef = dialogRef;
2851
+ this.isBusy = false;
2852
+ this.produtosGrupos = [];
2853
+ this.d.setting.grupos = undefined;
2854
+ }
2855
+ ngOnInit() {
2856
+ this.getProdutos();
2857
+ }
2858
+ getProdutos() {
2859
+ this.isBusy = true;
2860
+ this.ws.getAllProdutoGrupo()
2861
+ .subscribe(r => {
2862
+ this.produtosGrupos = r;
2863
+ console.info(r);
2864
+ this.isBusy = false;
2865
+ }, err => {
2866
+ this.isBusy = false;
2867
+ this.notification.showHttpError(err);
2868
+ });
2869
+ }
2870
+ salvar() {
2871
+ this.dialogRef.close(this.d);
2872
+ }
2873
+ changeGruposProdutos(ev) {
2874
+ const itens = ev.value;
2875
+ this.d.setting.grupos = itens;
2876
+ }
2877
+ }
2878
+ ProdutoBuscaFiltrosDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoBuscaFiltrosDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: CommonWebService }, { token: NotificationService }, { token: i3.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
2879
+ ProdutoBuscaFiltrosDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoBuscaFiltrosDialogComponent, selector: "app-produto-busca-filtros-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <span class=\"titulo\">Filtros de Pesquisa</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 <div class=\"vbox\">\n <h4>Op\u00E7\u00F5es de exibi\u00E7\u00E3o</h4>\n <mat-slide-toggle [(ngModel)]=\"d.setting.exibeNaoControladoEstoque\" tabindex=-1>Exibir n\u00E3o controlado no\n estoque</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"d.setting.exibeApenasMostraRecepcao\" tabindex=-1>Apenas o que mostra na recep\u00E7\u00E3o\n </mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"d.setting.exibeImprimiCozinha\" tabindex=-1>Exibir imprime na cozinha\n </mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"d.setting.exibeInativo\" tabindex=-1>Exibir desativados</mat-slide-toggle>\n </div>\n <div class=\"vbox margin-top-16\">\n <h4>Selecione um ou mais grupos</h4>\n <mat-select (selectionChange)=\"changeGruposProdutos($event)\" multiple>\n <mat-option *ngFor=\"let i of produtosGrupos\" [value]=\"i.id\">\n {{i.nome}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"vbox margin-top-32\">\n <h4>Quantidade de Itens por P\u00E1gina</h4>\n\n <div class=\"form-group\">\n <label>Quantidade</label>\n <input [(ngModel)]=\"d.qtd\" 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}.header{display:flex;background:white;border-bottom:1px solid #eee}.header .titulo{align-self:center;margin-left:16px;text-transform:uppercase;flex-grow:1}mat-select{background:white;height:36px;padding:8px 16px;border-radius:.25rem;border:1px solid #ced4da}h4{margin:0 0 16px}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }] });
2880
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoBuscaFiltrosDialogComponent, decorators: [{
2881
+ type: Component,
2882
+ args: [{ selector: 'app-produto-busca-filtros-dialog', template: "<div class=\"ox-header\">\n <span class=\"titulo\">Filtros de Pesquisa</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 <div class=\"vbox\">\n <h4>Op\u00E7\u00F5es de exibi\u00E7\u00E3o</h4>\n <mat-slide-toggle [(ngModel)]=\"d.setting.exibeNaoControladoEstoque\" tabindex=-1>Exibir n\u00E3o controlado no\n estoque</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"d.setting.exibeApenasMostraRecepcao\" tabindex=-1>Apenas o que mostra na recep\u00E7\u00E3o\n </mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"d.setting.exibeImprimiCozinha\" tabindex=-1>Exibir imprime na cozinha\n </mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"d.setting.exibeInativo\" tabindex=-1>Exibir desativados</mat-slide-toggle>\n </div>\n <div class=\"vbox margin-top-16\">\n <h4>Selecione um ou mais grupos</h4>\n <mat-select (selectionChange)=\"changeGruposProdutos($event)\" multiple>\n <mat-option *ngFor=\"let i of produtosGrupos\" [value]=\"i.id\">\n {{i.nome}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"vbox margin-top-32\">\n <h4>Quantidade de Itens por P\u00E1gina</h4>\n\n <div class=\"form-group\">\n <label>Quantidade</label>\n <input [(ngModel)]=\"d.qtd\" 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}.header{display:flex;background:white;border-bottom:1px solid #eee}.header .titulo{align-self:center;margin-left:16px;text-transform:uppercase;flex-grow:1}mat-select{background:white;height:36px;padding:8px 16px;border-radius:.25rem;border:1px solid #ced4da}h4{margin:0 0 16px}\n"] }]
2883
+ }], ctorParameters: function () {
2884
+ return [{ type: undefined, decorators: [{
2885
+ type: Inject,
2886
+ args: [MAT_DIALOG_DATA]
2887
+ }] }, { type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialogRef }];
2888
+ } });
2889
+
2890
+ class ProdutoEditDialogComponent {
2891
+ constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
2892
+ this.ws = ws;
2893
+ this.notification = notification;
2894
+ this.dataDialog = dataDialog;
2895
+ this.dialog = dialog;
2896
+ this.elRef = elRef;
2897
+ this.dialogRef = dialogRef;
2898
+ this.screenHelper = screenHelper;
2899
+ this.isBusy = false;
2900
+ this.focus = new FocusService();
2901
+ if (dataDialog) {
2902
+ this.model = dataDialog;
2903
+ }
2904
+ this.mobile = this.screenHelper.isMedium;
2905
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
2906
+ }
2907
+ ngOnInit() {
2908
+ this.focus.registerElement(this.elRef.nativeElement);
2909
+ }
2910
+ ngOnDestroy() {
2911
+ this.focus.unregisterElement(this.elRef.nativeElement);
2912
+ }
2913
+ salvar() {
2914
+ if (!this.model)
2915
+ return;
2916
+ const valMsg = valida$1(this.model, this.focus);
2917
+ if (valMsg) {
2918
+ this.notification.showMsgError(valMsg);
2919
+ return;
2920
+ }
2921
+ this.isBusy = true;
2922
+ this.ws.saveProduto(this.model)
2923
+ .subscribe(r => {
2924
+ this.isBusy = false;
2925
+ this.notification.showMsg("Salvo com sucesso.");
2926
+ if (this.dialogRef)
2927
+ this.dialogRef.close(true);
2928
+ }, err => {
2929
+ this.isBusy = false;
2930
+ this.notification.showMsg(err.error);
2931
+ });
2932
+ }
2933
+ }
2934
+ ProdutoEditDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoEditDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
2935
+ ProdutoEditDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoEditDialogComponent, selector: "app-produto-edit-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Produto</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-form [model]=\"model\" [editMode]=\"true\" *ngIf=\"model\"></app-produto-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>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.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: ProdutoFormComponent, selector: "app-produto-form", inputs: ["editMode", "model"], outputs: ["nextIdClick"] }] });
2936
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoEditDialogComponent, decorators: [{
2937
+ type: Component,
2938
+ args: [{ selector: 'app-produto-edit-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Produto</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-form [model]=\"model\" [editMode]=\"true\" *ngIf=\"model\"></app-produto-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>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"] }]
2939
+ }], ctorParameters: function () {
2940
+ return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
2941
+ type: Inject,
2942
+ args: [MAT_DIALOG_DATA]
2943
+ }] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }];
2944
+ } });
2945
+
2946
+ class ProdutosComponent {
2947
+ constructor(ws, notification, dialog, auth, screenHelper) {
2948
+ this.ws = ws;
2949
+ this.notification = notification;
2950
+ this.dialog = dialog;
2951
+ this.screenHelper = screenHelper;
2952
+ this.isBusy = false;
2953
+ this.items = [];
2954
+ this.result = {
2955
+ finalQtd: 0,
2956
+ inicioQtd: 0,
2957
+ items: [],
2958
+ pagina: 0,
2959
+ quantidade: 0,
2960
+ valor: 0,
2961
+ totalPaginas: 0
2962
+ };
2963
+ this._selectedItem = null;
2964
+ this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
2965
+ this.setting = new ProdutoSearchSetting();
2966
+ this.focus = new FocusService();
2967
+ this.paginaAtual = 1;
2968
+ this.quantidadePagina = 50;
2969
+ this.allowAdd = auth.permissoes.adminProdutoAdd;
2970
+ this.allowExcluir = auth.permissoes.adminProdutoDelete;
2971
+ this.mobile = this.screenHelper.isMedium;
2972
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
2973
+ this.setting.exibeNaoControladoEstoque = true;
2974
+ this.setting.exibeImprimiCozinha = true;
2975
+ }
2976
+ get selectedItem() {
2977
+ return this._selectedItem;
2978
+ }
2979
+ set selectedItem(p) {
2980
+ this._selectedItem = p;
2981
+ }
2982
+ ngOnInit() {
2983
+ this.setting.ordem = "nome";
2984
+ this.atualiza();
2985
+ }
2986
+ onSelectItem() {
2987
+ if (!this.focus.hasInit()) {
2988
+ setTimeout(() => {
2989
+ this.focus.registerElementById("form-column");
2990
+ this.focus.setFirst();
2991
+ }, 500);
2992
+ //this._focus.registerElementById("form-column");
2993
+ }
2994
+ else {
2995
+ this.focus.setFirst();
2996
+ }
2997
+ }
2998
+ ngOnDestroy() {
2999
+ this.focus.unregisterElementById("form-column");
3000
+ }
3001
+ trocaPagina() {
3002
+ this.atualiza(this.paginaAtual);
3003
+ }
3004
+ atualiza(pagina) {
3005
+ if (pagina == undefined)
3006
+ this.paginaAtual = 1;
3007
+ else
3008
+ this.paginaAtual = pagina;
3009
+ this.isBusy = true;
3010
+ this.ws.buscaPaginadaProdutos(this.setting, this.paginaAtual, this.quantidadePagina)
3011
+ .subscribe(r => {
3012
+ this.items = r.items;
3013
+ this.result = r;
3014
+ this.selectedItem = null;
3015
+ console.info(r);
3016
+ this.isBusy = false;
3017
+ }, err => {
3018
+ this.isBusy = false;
3019
+ this.notification.showHttpError(err);
3020
+ });
3021
+ }
3022
+ excluir() {
3023
+ const item = this.selectedItem;
3024
+ if (!item)
3025
+ return;
3026
+ confirmaExclusao(this.dialog, `Deseja prosseguir com a exclusão do produto ${item.nome}?`, () => {
3027
+ this.isBusy = true;
3028
+ this.ws.deleteProduto(item.id)
3029
+ .subscribe(r => {
3030
+ this.notification.showMsg("O produto foi excluído com sucesso.");
3031
+ this.items.remove(item);
3032
+ this.selectedItem = null;
3033
+ this.isBusy = false;
3034
+ }, err => {
3035
+ this.isBusy = false;
3036
+ this.notification.showMsg(err.error);
3037
+ });
3038
+ });
3039
+ }
3040
+ novo() {
3041
+ let height = (window.innerHeight * 0.90) + 'px';
3042
+ let width = 550 + 'px';
3043
+ if (this.mobile) {
3044
+ width = (window.innerWidth * 0.99) + 'px';
3045
+ //height = (window.innerHeight * 0.98) + 'px';
3046
+ }
3047
+ const dialog = this.dialog.open(ProdutoAddDialogComponent, {
3048
+ width: width,
3049
+ height: height,
3050
+ maxWidth: '100%',
3051
+ panelClass: 'dialog-p0',
3052
+ });
3053
+ dialog.afterClosed().subscribe(result => {
3054
+ if (result === undefined)
3055
+ return;
3056
+ this.notification.showMsg("Salvo com sucesso.");
3057
+ this.atualiza();
3058
+ });
3059
+ }
3060
+ abreCadastro(item) {
3061
+ let height = undefined;
3062
+ let width = 550 + 'px';
3063
+ if (this.mobile) {
3064
+ width = (window.innerWidth * 0.99) + 'px';
3065
+ height = (window.innerHeight * 0.99) + 'px';
3066
+ }
3067
+ const dialog = this.dialog.open(ProdutoEditDialogComponent, {
3068
+ data: item,
3069
+ width: width,
3070
+ height: height,
3071
+ maxWidth: '100%',
3072
+ panelClass: 'dialog-p0',
3073
+ });
3074
+ dialog.afterClosed().subscribe(result => {
3075
+ if (result !== true)
3076
+ return;
3077
+ this.notification.showMsg("Salvo com sucesso.");
3078
+ this.atualiza();
3079
+ });
3080
+ }
3081
+ salvar() {
3082
+ if (!this.selectedItem)
3083
+ return;
3084
+ const valMsg = valida$1(this.selectedItem, this.focus);
3085
+ if (valMsg) {
3086
+ this.notification.showMsgError(valMsg);
3087
+ return;
3088
+ }
3089
+ this.isBusy = true;
3090
+ this.ws.saveProduto(this.selectedItem)
3091
+ .subscribe(r => {
3092
+ this.notification.showMsg("Salvo com sucesso.");
3093
+ this.isBusy = false;
3094
+ }, err => {
3095
+ this.isBusy = false;
3096
+ this.notification.showMsg(err.error);
3097
+ });
3098
+ }
3099
+ filtros() {
3100
+ let height = undefined;
3101
+ let width = 550 + 'px';
3102
+ if (this.mobile) {
3103
+ width = (window.innerWidth * 0.99) + 'px';
3104
+ height = (window.innerHeight * 0.99) + 'px';
3105
+ }
3106
+ const p = {
3107
+ qtd: this.quantidadePagina,
3108
+ setting: this.setting
3109
+ };
3110
+ const dialog = this.dialog.open(ProdutoBuscaFiltrosDialogComponent, {
3111
+ data: p,
3112
+ width: width,
3113
+ height: height,
3114
+ maxWidth: '100%',
3115
+ panelClass: 'dialog-p0',
3116
+ });
3117
+ dialog.afterClosed().subscribe(result => {
3118
+ if (!result)
3119
+ return;
3120
+ const r = result;
3121
+ this.quantidadePagina = r.qtd;
3122
+ this.atualiza();
3123
+ });
3124
+ }
3125
+ }
3126
+ 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 });
3127
+ ProdutosComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutosComponent, selector: "app-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 <app-produto-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\" [editMode]=\"true\">\n </app-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: "app-produto-form", inputs: ["editMode", "model"], outputs: ["nextIdClick"] }, { kind: "pipe", type: i6.UpperCasePipe, name: "uppercase" }], animations: [fadeAnimation] });
3128
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosComponent, decorators: [{
3129
+ type: Component,
3130
+ args: [{ selector: 'app-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 <app-produto-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\" [editMode]=\"true\">\n </app-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"] }]
3131
+ }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialog }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
3132
+
3133
+ class MoverGrupoDialogComponent {
3134
+ constructor(ws, dialogRef, notification, dataDialog) {
3135
+ this.ws = ws;
3136
+ this.dialogRef = dialogRef;
3137
+ this.notification = notification;
3138
+ this.dataDialog = dataDialog;
3139
+ this.grupos = [];
3140
+ this.selected = null;
3141
+ this.isBusy = false;
3142
+ }
3143
+ ngOnInit() {
3144
+ this.atualiza();
3145
+ }
3146
+ atualiza() {
3147
+ this.isBusy = true;
3148
+ this.ws.getAllProdutoGrupo()
3149
+ .subscribe(r => {
3150
+ this.grupos = r;
3151
+ console.info(r);
3152
+ this.isBusy = false;
3153
+ }, err => {
3154
+ this.isBusy = false;
3155
+ this.notification.showHttpError(err);
3156
+ });
3157
+ }
3158
+ salvar() {
3159
+ if (!this.selected) {
3160
+ this.notification.showMsgError("Selecione um novo grupo.");
3161
+ return;
3162
+ }
3163
+ this.isBusy = true;
3164
+ this.ws.transfereProdutoGrupo(this.dataDialog.id, this.selected.id)
3165
+ .subscribe(r => {
3166
+ console.info(r);
3167
+ this.notification.showMsg(`${r} produtos foram atualizados com sucesso.`);
3168
+ this.dialogRef.close();
3169
+ this.isBusy = false;
3170
+ }, err => {
3171
+ this.isBusy = false;
3172
+ this.notification.showHttpError(err);
3173
+ });
3174
+ }
3175
+ }
3176
+ MoverGrupoDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: MoverGrupoDialogComponent, deps: [{ token: CommonWebService }, { token: i3.MatDialogRef }, { token: NotificationService }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
3177
+ MoverGrupoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: MoverGrupoDialogComponent, selector: "app-mover-grupo-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Transferir Produtos para um Novo Grupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <div class=\"vbox\">\n <p *ngIf=\"!selected\">Voc\u00EA pode transferir todos os produtos que utilizam o grupo <strong>'{{dataDialog.nome}}'</strong> para outro grupo.</p>\n <p class=\"alert alert-warning\" *ngIf=\"selected\">Transferir produtos com grupo '{{dataDialog.nome}}'' para '{{selected?.nome}}'</p>\n <h4>Selecione um novo grupo para transferir os produtos do grupo</h4>\n \n <mat-select class=\"form-group\" [(value)]=\"selected\">\n <mat-option *ngFor=\"let i of grupos\" [value]=\"i\">\n {{i.nome}}\n </mat-option>\n </mat-select>\n \n </div>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>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: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }] });
3178
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: MoverGrupoDialogComponent, decorators: [{
3179
+ type: Component,
3180
+ args: [{ selector: 'app-mover-grupo-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Transferir Produtos para um Novo Grupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <div class=\"vbox\">\n <p *ngIf=\"!selected\">Voc\u00EA pode transferir todos os produtos que utilizam o grupo <strong>'{{dataDialog.nome}}'</strong> para outro grupo.</p>\n <p class=\"alert alert-warning\" *ngIf=\"selected\">Transferir produtos com grupo '{{dataDialog.nome}}'' para '{{selected?.nome}}'</p>\n <h4>Selecione um novo grupo para transferir os produtos do grupo</h4>\n \n <mat-select class=\"form-group\" [(value)]=\"selected\">\n <mat-option *ngFor=\"let i of grupos\" [value]=\"i\">\n {{i.nome}}\n </mat-option>\n </mat-select>\n \n </div>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>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"] }]
3181
+ }], ctorParameters: function () {
3182
+ return [{ type: CommonWebService }, { type: i3.MatDialogRef }, { type: NotificationService }, { type: undefined, decorators: [{
3183
+ type: Inject,
3184
+ args: [MAT_DIALOG_DATA]
3185
+ }] }];
3186
+ } });
3187
+
3188
+ class ProdutosGruposComponent {
3189
+ constructor(ws, notification, dialog, auth, screenHelper) {
3190
+ this.ws = ws;
3191
+ this.notification = notification;
3192
+ this.dialog = dialog;
3193
+ this.screenHelper = screenHelper;
3194
+ this.isBusy = false;
3195
+ this.items = [];
3196
+ this.selectedItem = null;
3197
+ this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
3198
+ this.setting = new SearchSetting();
3199
+ this.focus = new FocusService();
3200
+ this.allowAdd = auth.permissoes.adminProdutoGrupoAdd;
3201
+ this.allowExcluir = auth.permissoes.adminProdutoGrupoDelete;
3202
+ this.mobile = this.screenHelper.isMedium;
3203
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
3204
+ }
3205
+ ngOnInit() {
3206
+ this.setting.ordem = "nome";
3207
+ this.atualiza();
3208
+ }
3209
+ onSelectItem() {
3210
+ if (!this.focus.hasInit()) {
3211
+ setTimeout(() => {
3212
+ this.focus.registerElementById("form-column");
3213
+ this.focus.setFirst();
3214
+ }, 500);
3215
+ //this._focus.registerElementById("form-column");
3216
+ }
3217
+ else {
3218
+ this.focus.setFirst();
3219
+ }
3220
+ }
3221
+ ngOnDestroy() {
3222
+ this.focus.unregisterElementById("form-column");
3223
+ }
3224
+ atualiza() {
3225
+ this.isBusy = true;
3226
+ this.ws.buscaProdutoGrupo(this.setting)
3227
+ .subscribe(r => {
3228
+ this.items = r;
3229
+ this.selectedItem = null;
3230
+ console.info(r);
3231
+ this.isBusy = false;
3232
+ }, err => {
3233
+ this.isBusy = false;
3234
+ this.notification.showHttpError(err);
3235
+ });
3236
+ }
3237
+ excluir() {
3238
+ const item = this.selectedItem;
3239
+ if (!item)
3240
+ return;
3241
+ confirmaExclusao(this.dialog, `Deseja prosseguir com a exclusão do grupo ${item.nome}?`, () => {
3242
+ this.isBusy = true;
3243
+ this.ws.deleteProdutoGrupo(item.id)
3244
+ .subscribe(r => {
3245
+ this.notification.showMsg("O grupo foi excluído com sucesso.");
3246
+ this.items.remove(item);
3247
+ this.selectedItem = null;
3248
+ this.isBusy = false;
3249
+ }, err => {
3250
+ this.isBusy = false;
3251
+ this.notification.showMsg(err.error);
3252
+ });
3253
+ });
3254
+ }
3255
+ novo() {
3256
+ let height = (window.innerHeight * 0.90) + 'px';
3257
+ let width = 550 + 'px';
3258
+ if (this.mobile) {
3259
+ width = (window.innerWidth * 0.99) + 'px';
3260
+ //height = (window.innerHeight * 0.98) + 'px';
3261
+ }
3262
+ const dialog = this.dialog.open(ProdutoGrupoAddDialogComponent, {
3263
+ width: width,
3264
+ //height: height,
3265
+ maxWidth: '100%',
3266
+ panelClass: 'dialog-p0',
3267
+ });
3268
+ dialog.afterClosed().subscribe(result => {
3269
+ if (result === undefined)
3270
+ return;
3271
+ this.notification.showMsg("Salvo com sucesso.");
3272
+ this.atualiza();
3273
+ });
3274
+ }
3275
+ abreCadastro(item) {
3276
+ let height = undefined;
3277
+ let width = 550 + 'px';
3278
+ if (this.mobile) {
3279
+ width = (window.innerWidth * 0.99) + 'px';
3280
+ height = (window.innerHeight * 0.99) + 'px';
3281
+ }
3282
+ const dialog = this.dialog.open(ProdutoGrupoEditDialogComponent, {
3283
+ data: item,
3284
+ width: width,
3285
+ //height: height,
3286
+ maxWidth: '100%',
3287
+ panelClass: 'dialog-p0',
3288
+ });
3289
+ dialog.afterClosed().subscribe(result => {
3290
+ if (result !== true)
3291
+ return;
3292
+ this.notification.showMsg("Salvo com sucesso.");
3293
+ this.atualiza();
3294
+ });
3295
+ }
3296
+ salvar() {
3297
+ const item = this.selectedItem;
3298
+ if (!item)
3299
+ return;
3300
+ const valMsg = valida(item, this.focus);
3301
+ if (valMsg) {
3302
+ this.notification.showMsgError(valMsg);
3303
+ return;
3304
+ }
3305
+ this.isBusy = true;
3306
+ this.ws.saveProdutoGrupo(item)
3307
+ .subscribe(r => {
3308
+ this.notification.showMsg("Salvo com sucesso.");
3309
+ this.isBusy = false;
3310
+ }, err => {
3311
+ this.isBusy = false;
3312
+ this.notification.showMsg(err.error);
3313
+ });
3314
+ }
3315
+ moverGrupo() {
3316
+ let height = (window.innerHeight * 0.90) + 'px';
3317
+ let width = 550 + 'px';
3318
+ if (this.mobile) {
3319
+ width = (window.innerWidth * 0.99) + 'px';
3320
+ //height = (window.innerHeight * 0.98) + 'px';
3321
+ }
3322
+ const dialog = this.dialog.open(MoverGrupoDialogComponent, {
3323
+ width: width,
3324
+ data: this.selectedItem,
3325
+ //height: height,
3326
+ maxWidth: '100%',
3327
+ panelClass: 'dialog-p0',
3328
+ });
3329
+ dialog.afterClosed().subscribe(result => {
3330
+ if (result === undefined)
3331
+ return;
3332
+ this.notification.showMsg("Salvo com sucesso.");
3333
+ this.atualiza();
3334
+ });
3335
+ }
3336
+ }
3337
+ ProdutosGruposComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosGruposComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: i3.MatDialog }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
3338
+ ProdutosGruposComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutosGruposComponent, selector: "app-produtos-grupos", 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 </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 <button mat-icon-button (click)=\"moverGrupo()\" *ngIf=\"selectedItem\" [@fade]>\n <mat-icon aria-label=\"Transferir Grupo\">sync_alt</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 [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Grupos de 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 </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 <button mat-icon-button (click)=\"moverGrupo()\" *ngIf=\"selectedItem\" [@fade]>\n <mat-icon aria-label=\"Transferir Grupo\">move_up</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 [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um grupo no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <app-produto-grupo-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\">\n </app-produto-grupo-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}\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: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }, { kind: "component", type: ProdutoGrupoFormComponent, selector: "app-produto-grupo-form", inputs: ["model"] }, { kind: "pipe", type: i6.UpperCasePipe, name: "uppercase" }], animations: [fadeAnimation] });
3339
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosGruposComponent, decorators: [{
3340
+ type: Component,
3341
+ args: [{ selector: 'app-produtos-grupos', 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 </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 <button mat-icon-button (click)=\"moverGrupo()\" *ngIf=\"selectedItem\" [@fade]>\n <mat-icon aria-label=\"Transferir Grupo\">sync_alt</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 [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Grupos de 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 </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 <button mat-icon-button (click)=\"moverGrupo()\" *ngIf=\"selectedItem\" [@fade]>\n <mat-icon aria-label=\"Transferir Grupo\">move_up</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 [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um grupo no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <app-produto-grupo-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\">\n </app-produto-grupo-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}\n"] }]
3342
+ }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialog }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
3343
+
3344
+ class ProdutosSubgruposComponent {
3345
+ constructor(ws, notification, dialog, auth, screenHelper) {
3346
+ this.ws = ws;
3347
+ this.notification = notification;
3348
+ this.dialog = dialog;
3349
+ this.screenHelper = screenHelper;
3350
+ this.isBusy = false;
3351
+ this.items = [];
3352
+ this.selectedItem = null;
3353
+ this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
3354
+ this.setting = new SearchSetting();
3355
+ this.focus = new FocusService();
3356
+ this.allowAdd = auth.permissoes.adminProdutoGrupoAdd;
3357
+ this.allowExcluir = auth.permissoes.adminProdutoGrupoDelete;
3358
+ this.mobile = this.screenHelper.isMedium;
3359
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
3360
+ }
3361
+ ngOnInit() {
3362
+ this.setting.ordem = "nome";
3363
+ this.atualiza();
3364
+ }
3365
+ onSelectItem() {
3366
+ if (!this.focus.hasInit()) {
3367
+ setTimeout(() => {
3368
+ this.focus.registerElementById("form-column");
3369
+ this.focus.setFirst();
3370
+ }, 500);
3371
+ //this._focus.registerElementById("form-column");
3372
+ }
3373
+ else {
3374
+ this.focus.setFirst();
3375
+ }
3376
+ }
3377
+ ngOnDestroy() {
3378
+ this.focus.unregisterElementById("form-column");
3379
+ }
3380
+ atualiza() {
3381
+ this.isBusy = true;
3382
+ this.ws.buscaProdutoSubgrupo(this.setting)
3383
+ .subscribe(r => {
3384
+ this.items = r;
3385
+ this.selectedItem = null;
3386
+ console.info(r);
3387
+ this.isBusy = false;
3388
+ }, err => {
3389
+ this.isBusy = false;
3390
+ this.notification.showHttpError(err);
3391
+ });
3392
+ }
3393
+ excluir() {
3394
+ const item = this.selectedItem;
3395
+ if (!item)
3396
+ return;
3397
+ confirmaExclusao(this.dialog, `Deseja prosseguir com a exclusão do subgrupo ${item.nome}?`, () => {
3398
+ this.isBusy = true;
3399
+ this.ws.deleteProdutoSubgrupo(item.id)
3400
+ .subscribe(r => {
3401
+ this.notification.showMsg("O subgrupo foi excluído com sucesso.");
3402
+ this.items.remove(item);
3403
+ this.selectedItem = null;
3404
+ this.isBusy = false;
3405
+ }, err => {
3406
+ this.isBusy = false;
3407
+ this.notification.showMsg(err.error);
3408
+ });
3409
+ });
3410
+ }
3411
+ novo() {
3412
+ let height = (window.innerHeight * 0.90) + 'px';
3413
+ let width = 550 + 'px';
3414
+ if (this.mobile) {
3415
+ width = (window.innerWidth * 0.99) + 'px';
3416
+ //height = (window.innerHeight * 0.98) + 'px';
3417
+ }
3418
+ const dialog = this.dialog.open(ProdutoSubgrupoAddDialogComponent, {
3419
+ width: width,
3420
+ //height: height,
3421
+ maxWidth: '100%',
3422
+ panelClass: 'dialog-p0',
3423
+ });
3424
+ dialog.afterClosed().subscribe(result => {
3425
+ if (result === undefined)
3426
+ return;
3427
+ this.notification.showMsg("Salvo com sucesso.");
3428
+ this.atualiza();
3429
+ });
3430
+ }
3431
+ abreCadastro(item) {
3432
+ let height = undefined;
3433
+ let width = 550 + 'px';
3434
+ if (this.mobile) {
3435
+ width = (window.innerWidth * 0.99) + 'px';
3436
+ height = (window.innerHeight * 0.99) + 'px';
3437
+ }
3438
+ const dialog = this.dialog.open(ProdutoSubgrupoEditDialogComponent, {
3439
+ data: item,
3440
+ width: width,
3441
+ //height: height,
3442
+ maxWidth: '100%',
3443
+ panelClass: 'dialog-p0',
3444
+ });
3445
+ dialog.afterClosed().subscribe(result => {
3446
+ if (result !== true)
3447
+ return;
3448
+ this.notification.showMsg("Salvo com sucesso.");
3449
+ this.atualiza();
3450
+ });
3451
+ }
3452
+ salvar() {
3453
+ if (!this.selectedItem)
3454
+ return;
3455
+ const valMsg = valida(this.selectedItem, this.focus);
3456
+ if (valMsg) {
3457
+ this.notification.showMsgError(valMsg);
3458
+ return;
3459
+ }
3460
+ this.isBusy = true;
3461
+ this.ws.saveProdutoSubgrupo(this.selectedItem)
3462
+ .subscribe(r => {
3463
+ this.notification.showMsg("Salvo com sucesso.");
3464
+ this.isBusy = false;
3465
+ }, err => {
3466
+ this.isBusy = false;
3467
+ this.notification.showMsg(err.error);
3468
+ });
3469
+ }
3470
+ }
3471
+ ProdutosSubgruposComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosSubgruposComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: i3.MatDialog }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
3472
+ ProdutosSubgruposComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutosSubgruposComponent, selector: "app-produtos-subgrupos", 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 </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 Subgrupo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir Subgrupo\">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 [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Subgrupos de 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 </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 [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um subgrupo no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <app-produto-grupo-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\">\n </app-produto-grupo-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}\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: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }, { kind: "component", type: ProdutoGrupoFormComponent, selector: "app-produto-grupo-form", inputs: ["model"] }, { kind: "pipe", type: i6.UpperCasePipe, name: "uppercase" }], animations: [fadeAnimation] });
3473
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosSubgruposComponent, decorators: [{
3474
+ type: Component,
3475
+ args: [{ selector: 'app-produtos-subgrupos', 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 </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 Subgrupo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir Subgrupo\">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 [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Subgrupos de 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 </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 [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um subgrupo no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <app-produto-grupo-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\">\n </app-produto-grupo-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}\n"] }]
3476
+ }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialog }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
3477
+
3478
+ class ProdutosCategoriasCardapioComponent {
3479
+ constructor(ws, notification, dialog, auth, screenHelper) {
3480
+ this.ws = ws;
3481
+ this.notification = notification;
3482
+ this.dialog = dialog;
3483
+ this.screenHelper = screenHelper;
3484
+ this.isBusy = false;
3485
+ this.items = [];
3486
+ this.selectedItem = null;
3487
+ this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
3488
+ this.setting = new SearchSetting();
3489
+ this.focus = new FocusService();
3490
+ this.allowAdd = auth.permissoes.adminProdutoGrupoAdd;
3491
+ this.allowExcluir = auth.permissoes.adminProdutoGrupoDelete;
3492
+ this.mobile = this.screenHelper.isMedium;
3493
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
3494
+ }
3495
+ ngOnInit() {
3496
+ this.setting.ordem = "nome";
3497
+ this.atualiza();
3498
+ }
3499
+ onSelectItem() {
3500
+ if (!this.focus.hasInit()) {
3501
+ setTimeout(() => {
3502
+ this.focus.registerElementById("form-column");
3503
+ this.focus.setFirst();
3504
+ }, 500);
3505
+ //this._focus.registerElementById("form-column");
3506
+ }
3507
+ else {
3508
+ this.focus.setFirst();
3509
+ }
3510
+ }
3511
+ ngOnDestroy() {
3512
+ this.focus.unregisterElementById("form-column");
3513
+ }
3514
+ atualiza() {
3515
+ this.isBusy = true;
3516
+ this.ws.buscaProdutoCategoriaCardapio(this.setting)
3517
+ .subscribe(r => {
3518
+ this.items = r;
3519
+ this.selectedItem = null;
3520
+ console.info(r);
3521
+ this.isBusy = false;
3522
+ }, err => {
3523
+ this.isBusy = false;
3524
+ this.notification.showHttpError(err);
3525
+ });
3526
+ }
3527
+ excluir() {
3528
+ const item = this.selectedItem;
3529
+ if (!item)
3530
+ return;
3531
+ confirmaExclusao(this.dialog, `Deseja prosseguir com a exclusão do grupo ${item.nome}?`, () => {
3532
+ this.isBusy = true;
3533
+ this.ws.deleteProdutoCategoriaCardapio(item.id)
3534
+ .subscribe(r => {
3535
+ this.notification.showMsg("O grupo foi excluído com sucesso.");
3536
+ this.items.remove(item);
3537
+ this.selectedItem = null;
3538
+ this.isBusy = false;
3539
+ }, err => {
3540
+ this.isBusy = false;
3541
+ this.notification.showMsg(err.error);
3542
+ });
3543
+ });
3544
+ }
3545
+ novo() {
3546
+ let height = (window.innerHeight * 0.90) + 'px';
3547
+ let width = 550 + 'px';
3548
+ if (this.mobile) {
3549
+ width = (window.innerWidth * 0.99) + 'px';
3550
+ //height = (window.innerHeight * 0.98) + 'px';
3551
+ }
3552
+ const dialog = this.dialog.open(ProdutoCategoriaCardapioAddDialogComponent, {
3553
+ width: width,
3554
+ //height: height,
3555
+ maxWidth: '100%',
3556
+ panelClass: 'dialog-p0',
3557
+ });
3558
+ dialog.afterClosed().subscribe(result => {
3559
+ if (result === undefined)
3560
+ return;
3561
+ this.notification.showMsg("Salvo com sucesso.");
3562
+ this.atualiza();
3563
+ });
3564
+ }
3565
+ abreCadastro(item) {
3566
+ let height = undefined;
3567
+ let width = 550 + 'px';
3568
+ if (this.mobile) {
3569
+ width = (window.innerWidth * 0.99) + 'px';
3570
+ height = (window.innerHeight * 0.99) + 'px';
3571
+ }
3572
+ const dialog = this.dialog.open(ProdutoCategoriaCardapioEditDialogComponent, {
3573
+ data: item,
3574
+ width: width,
3575
+ //height: height,
3576
+ maxWidth: '100%',
3577
+ panelClass: 'dialog-p0',
3578
+ });
3579
+ dialog.afterClosed().subscribe(result => {
3580
+ if (result !== true)
3581
+ return;
3582
+ this.notification.showMsg("Salvo com sucesso.");
3583
+ this.atualiza();
3584
+ });
3585
+ }
3586
+ salvar() {
3587
+ if (!this.selectedItem)
3588
+ return;
3589
+ const valMsg = valida(this.selectedItem, this.focus);
3590
+ if (valMsg) {
3591
+ this.notification.showMsgError(valMsg);
3592
+ return;
3593
+ }
3594
+ this.isBusy = true;
3595
+ this.ws.saveProdutoCategoriaCardapio(this.selectedItem)
3596
+ .subscribe(r => {
3597
+ this.notification.showMsg("Salvo com sucesso.");
3598
+ this.isBusy = false;
3599
+ }, err => {
3600
+ this.isBusy = false;
3601
+ this.notification.showMsg(err.error);
3602
+ });
3603
+ }
3604
+ }
3605
+ ProdutosCategoriasCardapioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosCategoriasCardapioComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: i3.MatDialog }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
3606
+ ProdutosCategoriasCardapioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutosCategoriasCardapioComponent, selector: "app-produtos-categorias-cardapio", 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 </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 [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Grupos de 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 </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 [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um grupo no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <app-produto-grupo-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\">\n </app-produto-grupo-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}\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: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }, { kind: "component", type: ProdutoGrupoFormComponent, selector: "app-produto-grupo-form", inputs: ["model"] }, { kind: "pipe", type: i6.UpperCasePipe, name: "uppercase" }], animations: [fadeAnimation] });
3607
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosCategoriasCardapioComponent, decorators: [{
3608
+ type: Component,
3609
+ args: [{ selector: 'app-produtos-categorias-cardapio', 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 </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 [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Grupos de 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 </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 [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um grupo no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <app-produto-grupo-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\">\n </app-produto-grupo-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}\n"] }]
3610
+ }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialog }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
3611
+
3612
+ Array.prototype.remove = function (item) {
3613
+ const index = this.indexOf(item);
3614
+ if (index === -1)
3615
+ return false;
3616
+ this.splice(index, 1);
3617
+ return true;
3618
+ };
3619
+ Array.prototype.firstOrNull = function () {
3620
+ if (this.length > 0)
3621
+ return this[0];
3622
+ return null;
3623
+ };
3624
+ Date.prototype.addDays = function (days) {
3625
+ var result = new Date(this);
3626
+ result.setDate(result.getDate() + days);
3627
+ return result;
3628
+ };
3629
+ class OxpiNglibModule {
3630
+ }
3631
+ OxpiNglibModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: OxpiNglibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3632
+ OxpiNglibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.5", ngImport: i0, type: OxpiNglibModule, declarations: [BusyIndicatorComponent,
3633
+ MonthYearPickerComponent,
3634
+ ImageViewerComponent,
3635
+ NumericPickerComponent,
3636
+ PaginatorComponent,
3637
+ CheckButtonComponent,
3638
+ RadioButtonGroupComponent,
3639
+ ItemCardComponent,
3640
+ SafeHtmlPipe,
3641
+ AlertDialogComponent,
3642
+ FuncionariosComponent,
3643
+ FuncionarioFormComponent,
3644
+ FuncionarioEditDialogComponent,
3645
+ FuncionarioAddDialogComponent,
3646
+ ProdutosComponent,
3647
+ ProdutoFormComponent,
3648
+ ProdutoAddDialogComponent,
3649
+ ProdutoBuscaFiltrosDialogComponent,
3650
+ ProdutoEditDialogComponent,
3651
+ ProdutosGruposComponent,
3652
+ MoverGrupoDialogComponent,
3653
+ ProdutoGrupoSelecaoDialogComponent,
3654
+ ProdutoGrupoAddDialogComponent,
3655
+ ProdutoGrupoEditDialogComponent,
3656
+ ProdutoGrupoFormComponent,
3657
+ ProdutosNcmDialogComponent,
3658
+ ProdutosSubgruposComponent,
3659
+ ProdutoSubgrupoSelecaoDialogComponent,
3660
+ ProdutoSubgrupoAddDialogComponent,
3661
+ ProdutoSubgrupoEditDialogComponent,
3662
+ ProdutosCategoriasCardapioComponent,
3663
+ ProdutoCategoriaCardapioAddDialogComponent,
3664
+ ProdutoCategoriaCardapioEditDialogComponent,
3665
+ ProdutoCategoriaCardapioSelecaoDialogComponent], imports: [BrowserModule,
3666
+ BrowserAnimationsModule,
3667
+ FormsModule,
3668
+ MatButtonModule,
3669
+ MatIconModule,
3670
+ MatDialogModule,
3671
+ MatSelectModule,
3672
+ MatAutocompleteModule], exports: [BusyIndicatorComponent,
3673
+ MonthYearPickerComponent,
3674
+ ImageViewerComponent,
3675
+ NumericPickerComponent,
3676
+ PaginatorComponent,
3677
+ CheckButtonComponent,
3678
+ RadioButtonGroupComponent,
3679
+ ItemCardComponent,
3680
+ SafeHtmlPipe] });
3681
+ OxpiNglibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: OxpiNglibModule, imports: [BrowserModule,
3682
+ BrowserAnimationsModule,
3683
+ FormsModule,
3684
+ MatButtonModule,
3685
+ MatIconModule,
3686
+ MatDialogModule,
3687
+ MatSelectModule,
3688
+ MatAutocompleteModule] });
3689
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: OxpiNglibModule, decorators: [{
3690
+ type: NgModule,
3691
+ args: [{
3692
+ declarations: [
3693
+ BusyIndicatorComponent,
3694
+ MonthYearPickerComponent,
3695
+ ImageViewerComponent,
3696
+ NumericPickerComponent,
3697
+ PaginatorComponent,
3698
+ CheckButtonComponent,
3699
+ RadioButtonGroupComponent,
3700
+ ItemCardComponent,
3701
+ SafeHtmlPipe,
3702
+ AlertDialogComponent,
3703
+ FuncionariosComponent,
3704
+ FuncionarioFormComponent,
3705
+ FuncionarioEditDialogComponent,
3706
+ FuncionarioAddDialogComponent,
3707
+ ProdutosComponent,
3708
+ ProdutoFormComponent,
3709
+ ProdutoAddDialogComponent,
3710
+ ProdutoBuscaFiltrosDialogComponent,
3711
+ ProdutoEditDialogComponent,
3712
+ ProdutosGruposComponent,
3713
+ MoverGrupoDialogComponent,
3714
+ ProdutoGrupoSelecaoDialogComponent,
3715
+ ProdutoGrupoAddDialogComponent,
3716
+ ProdutoGrupoEditDialogComponent,
3717
+ ProdutoGrupoFormComponent,
3718
+ ProdutosNcmDialogComponent,
3719
+ ProdutosSubgruposComponent,
3720
+ ProdutoSubgrupoSelecaoDialogComponent,
3721
+ ProdutoSubgrupoAddDialogComponent,
3722
+ ProdutoSubgrupoEditDialogComponent,
3723
+ ProdutosCategoriasCardapioComponent,
3724
+ ProdutoCategoriaCardapioAddDialogComponent,
3725
+ ProdutoCategoriaCardapioEditDialogComponent,
3726
+ ProdutoCategoriaCardapioSelecaoDialogComponent
3727
+ ],
3728
+ imports: [
3729
+ BrowserModule,
3730
+ BrowserAnimationsModule,
3731
+ FormsModule,
3732
+ MatButtonModule,
3733
+ MatIconModule,
3734
+ MatDialogModule,
3735
+ MatSelectModule,
3736
+ MatAutocompleteModule,
3737
+ ],
3738
+ exports: [
3739
+ BusyIndicatorComponent,
3740
+ MonthYearPickerComponent,
3741
+ ImageViewerComponent,
3742
+ NumericPickerComponent,
3743
+ PaginatorComponent,
3744
+ CheckButtonComponent,
3745
+ RadioButtonGroupComponent,
3746
+ ItemCardComponent,
3747
+ SafeHtmlPipe
3748
+ ]
3749
+ }]
3750
+ }] });
3751
+
3752
+ class BusyState {
3753
+ constructor() {
3754
+ this.isBusy = false;
3755
+ this.counter = 0;
3756
+ }
3757
+ show() {
3758
+ this.counter++;
3759
+ this.isBusy = true;
3760
+ }
3761
+ hide() {
3762
+ this.counter--;
3763
+ if (this.counter < 0)
3764
+ this.counter = 0;
3765
+ if (this.counter == 0)
3766
+ this.isBusy = false;
3767
+ }
3768
+ }
3769
+
3770
+ class Ordem {
3771
+ constructor(ordens, isCrescente, onToggle) {
3772
+ const d = ordens.filter(x => x.default === true).firstOrNull();
3773
+ this.colName = d === null ? ordens[0].value : d.value;
3774
+ this.isCrescente = isCrescente;
3775
+ this.onToggle = onToggle;
3776
+ }
3777
+ toggle() {
3778
+ this.isCrescente = !this.isCrescente;
3779
+ if (this.onToggle !== undefined)
3780
+ this.onToggle();
3781
+ }
3782
+ toString() {
3783
+ return this.colName + (!this.isCrescente ? " desc" : "");
3784
+ }
3785
+ }
3786
+
3787
+ function printTxt(txt) {
3788
+ const r = "<!doctype html><head><meta charset=\"utf-8\"></head><body><div style='font-family: \"Courier New\", Courier, monospace; white-space: pre-wrap;color: black;font-weight: bold;word-wrap: break-word;word-break: break-all;overflow-wrap: break-word;'>" + txt + '</div></body>';
3789
+ printHtml(r);
3790
+ }
3791
+ function printHtml(r) {
3792
+ const blob = new Blob([r], { type: 'text/html' });
3793
+ const url = window.URL.createObjectURL(blob);
3794
+ const w = window.open(url, '_blank');
3795
+ if (w != null)
3796
+ w.print();
3797
+ }
3798
+ function selectText(ev) {
3799
+ ev.target.select();
3800
+ }
3801
+
3802
+ class PagamentoRecebimentoSearchSetting extends SearchSetting {
3803
+ constructor() {
3804
+ super();
3805
+ this.exibirPagamentos = true;
3806
+ this.exibirRecebimentos = true;
3807
+ }
3808
+ }
3809
+
3810
+ class OcupacaoFilterSetting extends SearchSetting {
3811
+ constructor() {
3812
+ super();
3813
+ this.dom = false;
3814
+ this.seg = false;
3815
+ this.ter = false;
3816
+ this.qua = false;
3817
+ this.qui = false;
3818
+ this.sex = false;
3819
+ this.sab = false;
3820
+ }
3821
+ }
3822
+
3823
+ class OcupacaoSearchSetting extends OcupacaoFilterSetting {
3824
+ constructor() {
3825
+ super();
3826
+ this.dateFieldEnum = OcupacaoSearchDateField.DataBaseCaixa;
1717
3827
  }
1718
3828
  }
1719
3829
  var PorOcupacaoTipo;
@@ -1760,17 +3870,6 @@ class DuplicataSearchSetting extends SearchSetting {
1760
3870
  }
1761
3871
  }
1762
3872
 
1763
- class ProdutoSearchSetting extends SearchSetting {
1764
- constructor() {
1765
- super();
1766
- this.exibeNaoControladoEstoque = true;
1767
- this.exibeApenasMostraRecepcao = false;
1768
- this.exibeInativo = false;
1769
- this.exibeImprimiCozinha = false;
1770
- this.exibeHePrato = false;
1771
- }
1772
- }
1773
-
1774
3873
  class SuitesIntervencoesSetting extends SearchSetting {
1775
3874
  }
1776
3875