oxpi-nglib 1.0.9 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/esm2020/lib/cadastros/produtos/produto-add-dialog/produto-add-dialog.component.mjs +20 -16
  2. package/esm2020/lib/cadastros/produtos/produto-composicao/produto-composicao.component.mjs +148 -0
  3. package/esm2020/lib/cadastros/produtos/produto-composicao-add-dialog/produto-composicao-add-dialog.component.mjs +68 -0
  4. package/esm2020/lib/cadastros/produtos/produto-selecao-dialog/produto-selecao-dialog.component.mjs +135 -0
  5. package/esm2020/lib/cadastros/produtos/produtos/produtos.component.mjs +45 -17
  6. package/esm2020/lib/cadastros/produtos-subgrupos/produto-subgrupo-selecao-dialog/produto-subgrupo-selecao-dialog.component.mjs +11 -8
  7. package/esm2020/lib/models/entidades/login-result.mjs +1 -1
  8. package/esm2020/lib/models/entidades/produto-composicao.mjs +9 -0
  9. package/esm2020/lib/oxpi-nglib.module.mjs +12 -3
  10. package/esm2020/lib/providers/auth-data.service.mjs +5 -1
  11. package/esm2020/lib/providers/common-web-service.mjs +21 -1
  12. package/esm2020/public-api.mjs +5 -1
  13. package/fesm2015/oxpi-nglib.mjs +422 -41
  14. package/fesm2015/oxpi-nglib.mjs.map +1 -1
  15. package/fesm2020/oxpi-nglib.mjs +418 -41
  16. package/fesm2020/oxpi-nglib.mjs.map +1 -1
  17. package/lib/cadastros/produtos/produto-composicao/produto-composicao.component.d.ts +29 -0
  18. package/lib/cadastros/produtos/produto-composicao-add-dialog/produto-composicao-add-dialog.component.d.ts +29 -0
  19. package/lib/cadastros/produtos/produto-selecao-dialog/produto-selecao-dialog.component.d.ts +37 -0
  20. package/lib/cadastros/produtos/produtos/produtos.component.d.ts +2 -0
  21. package/lib/models/entidades/login-result.d.ts +2 -0
  22. package/lib/models/entidades/produto-composicao.d.ts +10 -0
  23. package/lib/oxpi-nglib.module.d.ts +13 -10
  24. package/lib/providers/auth-data.service.d.ts +2 -0
  25. package/lib/providers/common-web-service.d.ts +6 -0
  26. package/package.json +1 -1
  27. package/public-api.d.ts +4 -0
  28. package/styles/cadastros-listagens-form.scss +1 -0
@@ -0,0 +1,29 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { MatDialog, MatDialogRef } from '@angular/material/dialog';
3
+ import { Produto } from '../../../models/entidades/produto';
4
+ import { ProdutoComposicao } from '../../../models/entidades/produto-composicao';
5
+ import { CommonWebService } from '../../../providers/common-web-service';
6
+ import { NotificationService } from '../../../providers/notification.service';
7
+ import { ScreenHelperService } from '../../../providers/screen-helper.service';
8
+ import * as i0 from "@angular/core";
9
+ export declare class ProdutoComposicaoComponent implements OnInit {
10
+ dialogRef: MatDialogRef<ProdutoComposicaoComponent>;
11
+ dialog: MatDialog;
12
+ produto: Produto;
13
+ private ws;
14
+ private notification;
15
+ private screenHelper;
16
+ items: ProdutoComposicao[];
17
+ selectedItem: ProdutoComposicao | null;
18
+ isBusy: boolean;
19
+ mobile: boolean;
20
+ constructor(dialogRef: MatDialogRef<ProdutoComposicaoComponent>, dialog: MatDialog, produto: Produto, ws: CommonWebService, notification: NotificationService, screenHelper: ScreenHelperService);
21
+ ngOnInit(): void;
22
+ atualiza(): void;
23
+ selectItem(i: ProdutoComposicao): void;
24
+ novo(): void;
25
+ editar(): void;
26
+ excluir(): void;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<ProdutoComposicaoComponent, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<ProdutoComposicaoComponent, "ox-produto-composicao", never, {}, {}, never, never, false>;
29
+ }
@@ -0,0 +1,29 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { MatDialogRef } from '@angular/material/dialog';
3
+ import { Produto } from '../../../models/entidades/produto';
4
+ import { ProdutoComposicao } from '../../../models/entidades/produto-composicao';
5
+ import { CommonWebService } from '../../../providers/common-web-service';
6
+ import { FocusService } from '../../../providers/focus.service';
7
+ import { NotificationService } from '../../../providers/notification.service';
8
+ import { ScreenHelperService } from '../../../providers/screen-helper.service';
9
+ import * as i0 from "@angular/core";
10
+ export declare class ProdutoComposicaoAddDialogComponent implements OnInit {
11
+ model: ProdutoComposicao;
12
+ private ws;
13
+ private notification;
14
+ private dialogRef;
15
+ private screenHelper;
16
+ isBusy: boolean;
17
+ mobile: boolean;
18
+ focus: FocusService;
19
+ constructor(model: ProdutoComposicao, ws: CommonWebService, notification: NotificationService, dialogRef: MatDialogRef<ProdutoComposicaoAddDialogComponent>, screenHelper: ScreenHelperService);
20
+ ngOnInit(): void;
21
+ salvar(): void;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<ProdutoComposicaoAddDialogComponent, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<ProdutoComposicaoAddDialogComponent, "lib-produto-composicao-add-dialog", never, {}, {}, never, never, false>;
24
+ }
25
+ export interface ProdutoComposicaoDialogInfo {
26
+ qtd: number;
27
+ produto: Produto;
28
+ produtoItem: Produto;
29
+ }
@@ -0,0 +1,37 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { MatDialog, MatDialogRef } from '@angular/material/dialog';
3
+ import { Produto } from '../../../models/entidades/produto';
4
+ import { LazyTrigger } from '../../../models/infra/lazy-trigger';
5
+ import { NavegacaoSelecaoDialogUtil } from '../../../models/infra/selecao-utils';
6
+ import { SearchSetting } from '../../../models/settings/search-setting';
7
+ import { AuthDataService } from '../../../providers/auth-data.service';
8
+ import { CommonWebService } from '../../../providers/common-web-service';
9
+ import { NotificationService } from '../../../providers/notification.service';
10
+ import { ScreenHelperService } from '../../../providers/screen-helper.service';
11
+ import * as i0 from "@angular/core";
12
+ export declare class ProdutoSelecaoDialogComponent implements OnInit {
13
+ dialogRef: MatDialogRef<ProdutoSelecaoDialogComponent>;
14
+ dialog: MatDialog;
15
+ private ws;
16
+ private notification;
17
+ private screenHelper;
18
+ items: Produto[];
19
+ selectedItem: Produto | null;
20
+ isBusy: boolean;
21
+ mobile: boolean;
22
+ setting: SearchSetting;
23
+ allowAdd: boolean;
24
+ allowEdit: boolean;
25
+ lazyTrigger: LazyTrigger;
26
+ nav: NavegacaoSelecaoDialogUtil<Produto, ProdutoSelecaoDialogComponent>;
27
+ constructor(dialogRef: MatDialogRef<ProdutoSelecaoDialogComponent>, dialog: MatDialog, ws: CommonWebService, notification: NotificationService, auth: AuthDataService, screenHelper: ScreenHelperService);
28
+ ngOnInit(): void;
29
+ atualiza(): void;
30
+ selectItem(i: Produto): void;
31
+ editar(): void;
32
+ abreCadastro(item: Produto): void;
33
+ novo(): void;
34
+ excluir(): void;
35
+ static ɵfac: i0.ɵɵFactoryDeclaration<ProdutoSelecaoDialogComponent, never>;
36
+ static ɵcmp: i0.ɵɵComponentDeclaration<ProdutoSelecaoDialogComponent, "lib-produto-selecao-dialog", never, {}, {}, never, never, false>;
37
+ }
@@ -24,6 +24,7 @@ export declare class ProdutosComponent implements OnInit {
24
24
  lazyTrigger: LazyTrigger;
25
25
  allowAdd: boolean;
26
26
  allowExcluir: boolean;
27
+ usaEstoqueOnline: boolean;
27
28
  setting: ProdutoSearchSetting;
28
29
  private focus;
29
30
  paginaAtual: number;
@@ -39,6 +40,7 @@ export declare class ProdutosComponent implements OnInit {
39
40
  abreCadastro(item: Produto): void;
40
41
  salvar(): void;
41
42
  filtros(): void;
43
+ composicao(): void;
42
44
  static ɵfac: i0.ɵɵFactoryDeclaration<ProdutosComponent, never>;
43
45
  static ɵcmp: i0.ɵɵComponentDeclaration<ProdutosComponent, "ox-produtos", never, {}, {}, never, never, false>;
44
46
  }
@@ -10,4 +10,6 @@ export interface LoginResult {
10
10
  email: string;
11
11
  sensoresDef: SensoresDef;
12
12
  nome: string;
13
+ usaEstoqueOnline: boolean;
14
+ usaFinancasOnline: boolean;
13
15
  }
@@ -0,0 +1,10 @@
1
+ import { FocusService } from "../../providers/focus.service";
2
+ export interface ProdutoComposicao {
3
+ id: number;
4
+ produtoId: number;
5
+ produtoItemId: number;
6
+ produtoItemNome: string;
7
+ quantidade: number;
8
+ produtoNome: string;
9
+ }
10
+ export declare function validaProdutoComposicao(item: ProdutoComposicao, focus: FocusService): string | null;
@@ -33,15 +33,18 @@ import * as i31 from "./cadastros/produtos-categoria-cardapio/produtos-categoria
33
33
  import * as i32 from "./cadastros/produtos-categoria-cardapio/produto-categoria-cardapio-add-dialog/produto-categoria-cardapio-add-dialog.component";
34
34
  import * as i33 from "./cadastros/produtos-categoria-cardapio/produto-categoria-cardapio-edit-dialog/produto-categoria-cardapio-edit-dialog.component";
35
35
  import * as i34 from "./cadastros/produtos-categoria-cardapio/produto-categoria-cardapio-selecao-dialog/produto-categoria-cardapio-selecao-dialog.component";
36
- import * as i35 from "@angular/platform-browser";
37
- import * as i36 from "@angular/platform-browser/animations";
38
- import * as i37 from "@angular/forms";
39
- import * as i38 from "@angular/material/button";
40
- import * as i39 from "@angular/material/icon";
41
- import * as i40 from "@angular/material/dialog";
42
- import * as i41 from "@angular/material/select";
43
- import * as i42 from "@angular/material/autocomplete";
44
- import * as i43 from "@angular/material/slide-toggle";
36
+ import * as i35 from "./cadastros/produtos/produto-composicao/produto-composicao.component";
37
+ import * as i36 from "./cadastros/produtos/produto-composicao-add-dialog/produto-composicao-add-dialog.component";
38
+ import * as i37 from "./cadastros/produtos/produto-selecao-dialog/produto-selecao-dialog.component";
39
+ import * as i38 from "@angular/platform-browser";
40
+ import * as i39 from "@angular/platform-browser/animations";
41
+ import * as i40 from "@angular/forms";
42
+ import * as i41 from "@angular/material/button";
43
+ import * as i42 from "@angular/material/icon";
44
+ import * as i43 from "@angular/material/dialog";
45
+ import * as i44 from "@angular/material/select";
46
+ import * as i45 from "@angular/material/autocomplete";
47
+ import * as i46 from "@angular/material/slide-toggle";
45
48
  declare global {
46
49
  interface String {
47
50
  isEmpty(): boolean;
@@ -56,6 +59,6 @@ declare global {
56
59
  }
57
60
  export declare class OxpiNglibModule {
58
61
  static ɵfac: i0.ɵɵFactoryDeclaration<OxpiNglibModule, never>;
59
- static ɵmod: i0.ɵɵNgModuleDeclaration<OxpiNglibModule, [typeof i1.BusyIndicatorComponent, typeof i2.MonthYearPickerComponent, typeof i3.ImageViewerComponent, typeof i4.NumericPickerComponent, typeof i5.PaginatorComponent, typeof i6.CheckButtonComponent, typeof i7.RadioButtonGroupComponent, typeof i8.ItemCardComponent, typeof i9.SafeHtmlPipe, typeof i10.AlertDialogComponent, typeof i11.FuncionariosComponent, typeof i12.FuncionarioFormComponent, typeof i13.FuncionarioEditDialogComponent, typeof i14.FuncionarioAddDialogComponent, typeof i15.ProdutosComponent, typeof i16.ProdutoFormComponent, typeof i17.ProdutoAddDialogComponent, typeof i18.ProdutoBuscaFiltrosDialogComponent, typeof i19.ProdutoEditDialogComponent, typeof i20.ProdutosGruposComponent, typeof i21.MoverGrupoDialogComponent, typeof i22.ProdutoGrupoSelecaoDialogComponent, typeof i23.ProdutoGrupoAddDialogComponent, typeof i24.ProdutoGrupoEditDialogComponent, typeof i25.ProdutoGrupoFormComponent, typeof i26.ProdutosNcmDialogComponent, typeof i27.ProdutosSubgruposComponent, typeof i28.ProdutoSubgrupoSelecaoDialogComponent, typeof i29.ProdutoSubgrupoAddDialogComponent, typeof i30.ProdutoSubgrupoEditDialogComponent, typeof i31.ProdutosCategoriasCardapioComponent, typeof i32.ProdutoCategoriaCardapioAddDialogComponent, typeof i33.ProdutoCategoriaCardapioEditDialogComponent, typeof i34.ProdutoCategoriaCardapioSelecaoDialogComponent], [typeof i35.BrowserModule, typeof i36.BrowserAnimationsModule, typeof i37.FormsModule, typeof i38.MatButtonModule, typeof i39.MatIconModule, typeof i40.MatDialogModule, typeof i41.MatSelectModule, typeof i42.MatAutocompleteModule, typeof i43.MatSlideToggleModule], [typeof i1.BusyIndicatorComponent, typeof i2.MonthYearPickerComponent, typeof i3.ImageViewerComponent, typeof i4.NumericPickerComponent, typeof i5.PaginatorComponent, typeof i6.CheckButtonComponent, typeof i7.RadioButtonGroupComponent, typeof i8.ItemCardComponent, typeof i9.SafeHtmlPipe]>;
62
+ static ɵmod: i0.ɵɵNgModuleDeclaration<OxpiNglibModule, [typeof i1.BusyIndicatorComponent, typeof i2.MonthYearPickerComponent, typeof i3.ImageViewerComponent, typeof i4.NumericPickerComponent, typeof i5.PaginatorComponent, typeof i6.CheckButtonComponent, typeof i7.RadioButtonGroupComponent, typeof i8.ItemCardComponent, typeof i9.SafeHtmlPipe, typeof i10.AlertDialogComponent, typeof i11.FuncionariosComponent, typeof i12.FuncionarioFormComponent, typeof i13.FuncionarioEditDialogComponent, typeof i14.FuncionarioAddDialogComponent, typeof i15.ProdutosComponent, typeof i16.ProdutoFormComponent, typeof i17.ProdutoAddDialogComponent, typeof i18.ProdutoBuscaFiltrosDialogComponent, typeof i19.ProdutoEditDialogComponent, typeof i20.ProdutosGruposComponent, typeof i21.MoverGrupoDialogComponent, typeof i22.ProdutoGrupoSelecaoDialogComponent, typeof i23.ProdutoGrupoAddDialogComponent, typeof i24.ProdutoGrupoEditDialogComponent, typeof i25.ProdutoGrupoFormComponent, typeof i26.ProdutosNcmDialogComponent, typeof i27.ProdutosSubgruposComponent, typeof i28.ProdutoSubgrupoSelecaoDialogComponent, typeof i29.ProdutoSubgrupoAddDialogComponent, typeof i30.ProdutoSubgrupoEditDialogComponent, typeof i31.ProdutosCategoriasCardapioComponent, typeof i32.ProdutoCategoriaCardapioAddDialogComponent, typeof i33.ProdutoCategoriaCardapioEditDialogComponent, typeof i34.ProdutoCategoriaCardapioSelecaoDialogComponent, typeof i35.ProdutoComposicaoComponent, typeof i36.ProdutoComposicaoAddDialogComponent, typeof i37.ProdutoSelecaoDialogComponent], [typeof i38.BrowserModule, typeof i39.BrowserAnimationsModule, typeof i40.FormsModule, typeof i41.MatButtonModule, typeof i42.MatIconModule, typeof i43.MatDialogModule, typeof i44.MatSelectModule, typeof i45.MatAutocompleteModule, typeof i46.MatSlideToggleModule], [typeof i1.BusyIndicatorComponent, typeof i2.MonthYearPickerComponent, typeof i3.ImageViewerComponent, typeof i4.NumericPickerComponent, typeof i5.PaginatorComponent, typeof i6.CheckButtonComponent, typeof i7.RadioButtonGroupComponent, typeof i8.ItemCardComponent, typeof i9.SafeHtmlPipe]>;
60
63
  static ɵinj: i0.ɵɵInjectorDeclaration<OxpiNglibModule>;
61
64
  }
@@ -13,6 +13,8 @@ export declare class AuthDataService {
13
13
  userId: number;
14
14
  email: string;
15
15
  nome: string;
16
+ usaEstoqueOnline: boolean;
17
+ usaFinancasOnline: boolean;
16
18
  constructor();
17
19
  login(result: LoginResult): void;
18
20
  static ɵfac: i0.ɵɵFactoryDeclaration<AuthDataService, never>;
@@ -2,6 +2,7 @@ import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
2
2
  import { Observable } from 'rxjs';
3
3
  import { Funcionario, FuncionarioCargo } from '../models/entidades/funcionario';
4
4
  import { Produto } from '../models/entidades/produto';
5
+ import { ProdutoComposicao } from '../models/entidades/produto-composicao';
5
6
  import { ProdutoCategoriaCardapio, ProdutoGrupo, ProdutoSubgrupo } from '../models/entidades/produto-grupo';
6
7
  import { Ncm } from '../models/entidades/produto-ncm';
7
8
  import { SetorEstoque } from '../models/entidades/setor-estoque';
@@ -22,6 +23,7 @@ export declare class CommonWebService {
22
23
  ESTOQUE_URL: string;
23
24
  MEDIA_BASE_URL: string;
24
25
  MEDIA_PRODUTO_IMAGEM_URL: string;
26
+ PRODUTO_COMPOSICAO_BASE_URL: string;
25
27
  static URL_PART_BUSCA: string;
26
28
  static URL_PART_NEXT_ID: string;
27
29
  static URL_PART_BUSCA_PAGINADA: string;
@@ -61,6 +63,10 @@ export declare class CommonWebService {
61
63
  addProdutoCategoriaCardapio(p: ProdutoCategoriaCardapio): Observable<any>;
62
64
  deleteProdutoCategoriaCardapio(id: number): Observable<any>;
63
65
  getAllSetores(): Observable<SetorEstoque[]>;
66
+ getProdutoComposicao(produtoId: number): Observable<ProdutoComposicao[]>;
67
+ saveProdutoComposicao(s: ProdutoComposicao): Observable<any>;
68
+ addProdutoComposicao(p: ProdutoComposicao): Observable<any>;
69
+ deleteProdutoComposicao(id: number): Observable<any>;
64
70
  getHttpOptions(parameters?: HttpParams): {
65
71
  headers: HttpHeaders;
66
72
  params: HttpParams | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oxpi-nglib",
3
- "version": "1.0.9",
3
+ "version": "1.0.13",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^14.0.5",
6
6
  "@angular/core": "^14.0.5"
package/public-api.d.ts CHANGED
@@ -7,6 +7,7 @@ export * from './lib/cadastros/produtos/produto-busca-filtros-dialog/produto-bus
7
7
  export * from './lib/cadastros/produtos/produto-edit-dialog/produto-edit-dialog.component';
8
8
  export * from './lib/cadastros/produtos/produto-form/produto-form.component';
9
9
  export * from './lib/cadastros/produtos/produtos/produtos.component';
10
+ export * from './lib/cadastros/produtos/produto-selecao-dialog/produto-selecao-dialog.component';
10
11
  export * from './lib/cadastros/produtos-categoria-cardapio/produto-categoria-cardapio-add-dialog/produto-categoria-cardapio-add-dialog.component';
11
12
  export * from './lib/cadastros/produtos-categoria-cardapio/produto-categoria-cardapio-edit-dialog/produto-categoria-cardapio-edit-dialog.component';
12
13
  export * from './lib/cadastros/produtos-categoria-cardapio/produto-categoria-cardapio-selecao-dialog/produto-categoria-cardapio-selecao-dialog.component';
@@ -22,6 +23,8 @@ export * from './lib/cadastros/produtos-subgrupos/produto-subgrupo-add-dialog/pr
22
23
  export * from './lib/cadastros/produtos-subgrupos/produto-subgrupo-edit-dialog/produto-subgrupo-edit-dialog.component';
23
24
  export * from './lib/cadastros/produtos-subgrupos/produtos-subgrupos/produtos-subgrupos.component';
24
25
  export * from './lib/cadastros/produtos-subgrupos/produto-subgrupo-selecao-dialog/produto-subgrupo-selecao-dialog.component';
26
+ export * from './lib/cadastros/produtos/produto-composicao/produto-composicao.component';
27
+ export * from './lib/cadastros/produtos/produto-composicao-add-dialog/produto-composicao-add-dialog.component';
25
28
  export * from './lib/controls/busy-indicator/busy-indicator.component';
26
29
  export * from './lib/controls/check-button/check-button.component';
27
30
  export * from './lib/controls/image-viewer/image-viewer.component';
@@ -41,6 +44,7 @@ export * from './lib/models/entidades/produto-grupo';
41
44
  export * from './lib/models/entidades/produto-ncm';
42
45
  export * from './lib/models/entidades/produto';
43
46
  export * from './lib/models/entidades/setor-estoque';
47
+ export * from './lib/models/entidades/produto-composicao';
44
48
  export * from './lib/models/tuple';
45
49
  export * from './lib/models/infra/busy-state';
46
50
  export * from './lib/models/infra/lazy-trigger';
@@ -29,6 +29,7 @@
29
29
  bottom: 0;
30
30
  padding-bottom: 16px;
31
31
  z-index: 1;
32
+ gap: 8px;
32
33
  }
33
34
  .listagem-form-container {
34
35
  display: flex;