Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PoPageDynamicTableComponent - URL inadequada #1211

Closed
wsteixeira opened this issue Feb 24, 2022 Discussed in #1138 · 5 comments · May be fixed by #1213
Closed

PoPageDynamicTableComponent - URL inadequada #1211

wsteixeira opened this issue Feb 24, 2022 Discussed in #1138 · 5 comments · May be fixed by #1213
Labels
status: awaiting author Additional information has been requested from the author status: triage Issue or pull request that need to be triaged and assigned to a reviewer

Comments

@wsteixeira
Copy link
Contributor

Discussed in #1138

Originally posted by wsteixeira December 21, 2021
Olá,

Estou tentando usar o atributo "range" na busca avançada do "Page Dynamic Table", porem creio que a URL está sendo gerada de forma inadequada. Segue abaixo o objeto "fields" e a URL gerada.

  readonly fields: Array<PoPageDynamicTableFilters> = [
    { property: 'id', label: 'Id', key: true, visible: false },
    { property: 'date', label: 'Data', type: 'date', filter: true, range: true },
  ];

http://localhost:4200/api/visitors?page=1&pageSize=10&date=%5Bobject%20Object%5D

@wsteixeira
Copy link
Contributor Author

Olá,
Eu estou tentando fazer uma simulação, mas está apresentando erro no https://stackblitz.com/edit/po-ui e o range parece que não é suportado naquela versão.

ERROR
Error: No component factory found for PoLoadingOverlayComponent. Did you add it to @NgModule.entryComponents?

Segue o link https://stackblitz.com/edit/po-ui-fm5hj2?devtoolsheight=33&file=src/app/app.component.ts

@brunoromeiro brunoromeiro added the status: triage Issue or pull request that need to be triaged and assigned to a reviewer label Mar 2, 2022
@brunoromeiro
Copy link
Contributor

Oi @wsteixeira, tudo bom? Tenta atualizar o arquivo package.json por estes dados abaixo. Fico no aguardo.

{
  "name": "angular",
  "version": "0.0.0",
  "private": true,
  "dependencies": {
    "@angular/animations": "^13.0.2",
    "@angular/common": "^13.0.2",
    "@angular/compiler": "^13.0.2",
    "@angular/core": "^13.0.2",
    "@angular/forms": "^13.0.2",
    "@angular/platform-browser": "^13.0.2",
    "@angular/platform-browser-dynamic": "^13.0.2",
    "@angular/router": "^13.0.2",
    "@ionic-native/core": "5.33.0",
    "@ionic-native/network": "5.33.0",
    "@po-ui/ng-code-editor": "^6.4.0",
    "@po-ui/ng-components": "^6.4.0",
    "@po-ui/ng-storage": "^6.4.0",
    "@po-ui/ng-sync": "^6.4.0",
    "@po-ui/ng-templates": "^6.4.0",
    "@po-ui/style": "^6.4.0",
    "core-js": "3.13.0",
    "custom-idle-queue": "2.1.2",
    "http-status-codes": "^2.1.4",
    "localforage": "1.9.0",
    "lokijs": "1.5.12",
    "monaco-editor": "0.24.0",
    "rxjs": "~7.4.0",
    "rxjs-compat": "~6.6.0",
    "tslib": "^2.3.0",
    "zone.js": "~0.11.4"
  },
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^13.0.3",
    "@angular/cli": "^13.2.2",
    "@angular/compiler-cli": "^13.0.2",
    "@angular/language-service": "^13.0.2",
    "@types/node": "^14.0.0",
    "@types/jasmine": "~3.7.6",
    "@types/jasminewd2": "~2.0.9",
    "codelyzer": "~4.5.0",
    "jasmine-core": "~3.8.0",
    "jasmine-spec-reporter": "~7.0.0",
    "karma": "~6.3.2",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage": "~2.0.3",
    "karma-jasmine": "~4.0.1",
    "karma-jasmine-html-reporter": "^1.7.0",
    "protractor": "~7.0.0",
    "ts-node": "~10.0.0",
    "tslint": "~6.1.0",
    "typescript": "~4.5.2"
  }
}

@brunoromeiro brunoromeiro added the status: awaiting author Additional information has been requested from the author label Mar 2, 2022
@wsteixeira
Copy link
Contributor Author

Olá @brunoromeiro,

Deu certo a atualização do simulador.

Segue a simulação https://stackblitz.com/edit/po-ui-fm5hj2?devtoolsheight=33&file=src/app/app.component.ts.

Esta é a URL https://po-sample-api.herokuapp.com/v1/people?page=1&pageSize=10&birthdate=%5Bobject%20Object%5D gerada, quando se aplica o filtro avançado na data.

@wsteixeira
Copy link
Contributor Author

Olá @brunoromeiro,

Eu vou preparar uma contribuição usando o $filter do Guia de APIs da Totvs - Filtros complexos.

wsteixeira added a commit to wsteixeira/po-angular that referenced this issue Mar 3, 2022
Foi incluído o `$filter` para filtros complexos no GET Request
quando o atributo `range` está com `true`

Fixes po-ui#1211
wsteixeira added a commit to wsteixeira/po-angular that referenced this issue Mar 3, 2022
Foi incluído o `$filter` para filtros complexos no GET Request
quando o atributo `range` está com `true`

Fixes po-ui#1211
@renanarosario
Copy link
Contributor

Após uma análise mais detalhada e considerando as recentes mudanças na nossa estratégia, decidimos encerrar esta issue. Agradecemos a todos que contribuíram com suas análises e sugestões.
Caso seja necessário, uma nova ISSUE será aberta conforme a evolução das nossas necessidades.

Agradecemos pela compreensão.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: awaiting author Additional information has been requested from the author status: triage Issue or pull request that need to be triaged and assigned to a reviewer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants