oxpi-nglib 1.0.68 → 1.0.71

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.
@@ -234,6 +234,10 @@ class CommonWebService {
234
234
  const url = this.PRODUTO_BASE_URL + CommonWebService.URL_PART_NEXT_ID;
235
235
  return this.http.get(url, this.getHttpOptions()).pipe(map(data => data));
236
236
  }
237
+ getProdutoHistory(id) {
238
+ const url = this.PRODUTO_BASE_URL + 'GetHistory/' + id;
239
+ return this.http.get(url, this.getHttpOptions()).pipe(map(data => data));
240
+ }
237
241
  findProduto(produtoId) {
238
242
  const url = this.PRODUTO_BASE_URL + produtoId;
239
243
  return this.http.get(url, this.getHttpOptions()).pipe(map(data => data));
@@ -969,6 +973,7 @@ class AuthDataService {
969
973
  this.permissoes = {
970
974
  gerencialCaixasAgrupadoMensal: false,
971
975
  gerencialAtividadesUsuarios: false,
976
+ gerencialAuditorias: false,
972
977
  financasLogin: false,
973
978
  financasLoginApenasWeb: false,
974
979
  financasDespesaAdd: false,
@@ -1443,6 +1448,8 @@ function createProduct() {
1443
1448
  adicionalDeProdutoId: null,
1444
1449
  produtoVerificaoGrupoId: null,
1445
1450
  produtoVerificaoGrupoNome: null,
1451
+ startTime: undefined,
1452
+ endTime: undefined
1446
1453
  };
1447
1454
  }
1448
1455
  ;
@@ -2999,10 +3006,10 @@ class ProdutoEditDialogComponent {
2999
3006
  }
3000
3007
  }
3001
3008
  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 });
3002
- ProdutoEditDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoEditDialogComponent, selector: "ox-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 <ox-produto-form [model]=\"model\" [editMode]=\"true\" *ngIf=\"model\"></ox-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$2.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: "ox-produto-form", inputs: ["editMode", "model"], outputs: ["nextIdClick"] }] });
3009
+ ProdutoEditDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoEditDialogComponent, selector: "ox-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 <ox-produto-form [model]=\"model\" [editMode]=\"true\" *ngIf=\"model\"></ox-produto-form>\n</div>\n<div class=\"dialog-footer\">\n <button *ngIf=\"model?.isHistorico !== true\" 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$2.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: "ox-produto-form", inputs: ["editMode", "model"], outputs: ["nextIdClick"] }] });
3003
3010
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoEditDialogComponent, decorators: [{
3004
3011
  type: Component,
3005
- args: [{ selector: 'ox-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 <ox-produto-form [model]=\"model\" [editMode]=\"true\" *ngIf=\"model\"></ox-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"] }]
3012
+ args: [{ selector: 'ox-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 <ox-produto-form [model]=\"model\" [editMode]=\"true\" *ngIf=\"model\"></ox-produto-form>\n</div>\n<div class=\"dialog-footer\">\n <button *ngIf=\"model?.isHistorico !== true\" 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"] }]
3006
3013
  }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
3007
3014
  type: Inject,
3008
3015
  args: [MAT_DIALOG_DATA]
@@ -5290,6 +5297,71 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImpor
5290
5297
  }]
5291
5298
  }], ctorParameters: function () { return [{ type: i1$2.DomSanitizer }]; } });
5292
5299
 
5300
+ class ProdutosHistoryComponent {
5301
+ constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
5302
+ this.ws = ws;
5303
+ this.notification = notification;
5304
+ this.dataDialog = dataDialog;
5305
+ this.dialog = dialog;
5306
+ this.elRef = elRef;
5307
+ this.dialogRef = dialogRef;
5308
+ this.screenHelper = screenHelper;
5309
+ this.items = [];
5310
+ this.isBusy = false;
5311
+ this.model = dataDialog;
5312
+ }
5313
+ ngOnInit() {
5314
+ this.atualiza();
5315
+ }
5316
+ atualiza() {
5317
+ this.isBusy = true;
5318
+ this.ws.getProdutoHistory(this.model.id)
5319
+ .subscribe({
5320
+ next: r => {
5321
+ for (const p of r) {
5322
+ p.isHistorico = true;
5323
+ }
5324
+ this.items = r;
5325
+ console.info(r);
5326
+ this.isBusy = false;
5327
+ }, error: err => {
5328
+ this.isBusy = false;
5329
+ this.notification.showHttpError(err);
5330
+ }
5331
+ });
5332
+ }
5333
+ abreCadastro(item) {
5334
+ let height = undefined;
5335
+ let width = 550 + 'px';
5336
+ if (this.mobile) {
5337
+ width = (window.innerWidth * 0.99) + 'px';
5338
+ height = (window.innerHeight * 0.99) + 'px';
5339
+ }
5340
+ const dialog = this.dialog.open(ProdutoEditDialogComponent, {
5341
+ data: item,
5342
+ width: width,
5343
+ height: height,
5344
+ maxWidth: '100%',
5345
+ panelClass: 'dialog-p0',
5346
+ });
5347
+ dialog.afterClosed().subscribe(result => {
5348
+ if (result !== true)
5349
+ return;
5350
+ this.notification.showMsg("Salvo com sucesso.");
5351
+ this.atualiza();
5352
+ });
5353
+ }
5354
+ }
5355
+ ProdutosHistoryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosHistoryComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
5356
+ ProdutosHistoryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutosHistoryComponent, selector: "lib-produtos-history", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Hist\u00F3rico do Produto '{{model.id}}'</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"result-container\" *ngIf=\"items\">\n <div class=\"reservas-container\">\n <h4 *ngIf=\"items.length === 0\" class=\"nenhum-item-msg\">Nenhum registro para ser exibido</h4>\n <div (click)=\"abreCadastro(item)\" class=\"historico-item\" *ngFor=\"let item of items\">\n <div class=\"historico-icon\">\n <i class=\"material-icons\">history</i>\n </div>\n <div class=\"historico-content\">\n <p class=\"historico-date\">{{ item.startTime | date:'EEE dd/MM/yy HH:mm' }} - {{ item.endTime | date:'EEE dd/MM/yy HH:mm' }}</p>\n <p class=\"historico-user\">{{ item.usuarioLogin }}</p>\n <p class=\"historico-modulo\">{{ item.modulo }}</p>\n </div>\n </div>\n </div>\n</div>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh;position:relative}.reservas-container{display:flex;flex-direction:column}.historico-item{display:flex;align-items:center;padding:10px;border-bottom:1px solid #ccc;font-family:Open Sans,sans-serif;background-color:#fff;cursor:pointer}.historico-item:hover{background-color:var(--item-card-selected-bg)}.historico-icon{font-size:24px;color:#39b7ab;margin-right:32px}.historico-content{flex:1;display:flex;flex-direction:column;gap:4px}.historico-date{margin:0;font-weight:500}.historico-user{margin:0;color:purple}.historico-modulo{margin:0;font-style:italic;color:#666;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: "component", type: i6$2.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: "pipe", type: i6.DatePipe, name: "date" }] });
5357
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosHistoryComponent, decorators: [{
5358
+ type: Component,
5359
+ args: [{ selector: 'lib-produtos-history', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Hist\u00F3rico do Produto '{{model.id}}'</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"result-container\" *ngIf=\"items\">\n <div class=\"reservas-container\">\n <h4 *ngIf=\"items.length === 0\" class=\"nenhum-item-msg\">Nenhum registro para ser exibido</h4>\n <div (click)=\"abreCadastro(item)\" class=\"historico-item\" *ngFor=\"let item of items\">\n <div class=\"historico-icon\">\n <i class=\"material-icons\">history</i>\n </div>\n <div class=\"historico-content\">\n <p class=\"historico-date\">{{ item.startTime | date:'EEE dd/MM/yy HH:mm' }} - {{ item.endTime | date:'EEE dd/MM/yy HH:mm' }}</p>\n <p class=\"historico-user\">{{ item.usuarioLogin }}</p>\n <p class=\"historico-modulo\">{{ item.modulo }}</p>\n </div>\n </div>\n </div>\n</div>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh;position:relative}.reservas-container{display:flex;flex-direction:column}.historico-item{display:flex;align-items:center;padding:10px;border-bottom:1px solid #ccc;font-family:Open Sans,sans-serif;background-color:#fff;cursor:pointer}.historico-item:hover{background-color:var(--item-card-selected-bg)}.historico-icon{font-size:24px;color:#39b7ab;margin-right:32px}.historico-content{flex:1;display:flex;flex-direction:column;gap:4px}.historico-date{margin:0;font-weight:500}.historico-user{margin:0;color:purple}.historico-modulo{margin:0;font-style:italic;color:#666;font-size:small}\n"] }]
5360
+ }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
5361
+ type: Inject,
5362
+ args: [MAT_DIALOG_DATA]
5363
+ }] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }]; } });
5364
+
5293
5365
  Array.prototype.remove = function (item) {
5294
5366
  const index = this.indexOf(item);
5295
5367
  if (index === -1)
@@ -5360,7 +5432,8 @@ OxpiNglibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
5360
5432
  FornecedoresComponent,
5361
5433
  FornecedoresAddDialogComponent,
5362
5434
  FornecedoresEditDialogComponent,
5363
- SelecaoFornecedorDialogComponent], imports: [BrowserModule,
5435
+ SelecaoFornecedorDialogComponent,
5436
+ ProdutosHistoryComponent], imports: [BrowserModule,
5364
5437
  BrowserAnimationsModule,
5365
5438
  FormsModule,
5366
5439
  MatButtonModule,
@@ -5440,7 +5513,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImpor
5440
5513
  FornecedoresComponent,
5441
5514
  FornecedoresAddDialogComponent,
5442
5515
  FornecedoresEditDialogComponent,
5443
- SelecaoFornecedorDialogComponent
5516
+ SelecaoFornecedorDialogComponent,
5517
+ ProdutosHistoryComponent
5444
5518
  ],
5445
5519
  imports: [
5446
5520
  BrowserModule,
@@ -5593,6 +5667,7 @@ class ConsumoProdutoSearchSetting extends SearchSetting {
5593
5667
  this.dateFieldEnum = OcupacaoSearchDateField.DataBaseCaixa;
5594
5668
  this.exibeVendas = true;
5595
5669
  this.exibeConsumoInterno = true;
5670
+ this.exibeDiretaFunc = true;
5596
5671
  this.porSubgrupo = false;
5597
5672
  this.horaInicial = 0;
5598
5673
  this.minutoInicial = 0;