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

Feature/cuenta bancaria #129

Closed
wants to merge 4 commits into from
Closed

Conversation

Jeisson005
Copy link
Contributor

@Jeisson005 Jeisson005 commented Oct 31, 2021

Antes de realizar el pull, se debe realizar el merge a las dependencias.
Todo se probó de forma local con las configuraciones adecuadas en las ramas correspondientes a esos pr

Depende de PRs:
udistrital/cuentas_contables_crud#56
udistrital/tesoreria_mid/pull/19

Close #92
Close udistrital/financiera_documentacion#363

Copy link
Contributor

@AlexFBP AlexFBP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En general bien.

  • Hay código duplicado y/o que se podría extender, revisar
  • Variables de entorno solo funcionarían bajo VPN, revisar


// Terceros

public getCuentasBancarias(parameters?: { id?: any, query?: any, fields?: string[], sortby?: string[], order?: string[], limit?: number, offset?: number }) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Se observa que { id?: any, query?: any, fields?: string[], sortby?: string[], order?: string[], limit?: number, offset?: number } se repite en varias partes.
Guardar esta estructura como un nuevo modelo de datos, por ejemplo, algo como BeegoQueryParams:

interface BeegoQueryParams {
  id?: string; // evitar el any
  query?: string; // evitar el any
  fields?: string[];
  sortby?: string[];
  order?: string[];
  limit?: number;
  offset?: number;
}
...
export {..., BeegoQueryParams};

De tal manera que el getCuentasBancarias (y dondesea que se use esta misma estructura) se pueda reescribir como

import {BeegoQueryParams} from '...';
...
public getCuentasBancarias(parameters?: BeegoQueryParams){...}

(Si no funciona con interface usar simplemente class)


// Tercero

public getTerceros(parameters?: { id?: any, query?: any, fields?: string[], sortby?: string[], order?: string[], limit?: number, offset?: number }) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ver lo comentado en src/app/@core/helpers/giros/girosHelper.ts

}

// Tercero_tipo_tercero
public getTerceroTipoTercero(parameters?: { id?: any, query?: any, fields?: string[], sortby?: string[], order?: string[], limit?: number, offset?: number }) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ver lo comentado en src/app/@core/helpers/giros/girosHelper.ts


// tesoreria_mid

public getCuentasBancarias(parameters?: { id?: any, limit?: number, offset?: number }) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Posiblemente se pueda hacer algo similar a lo comentado en src/app/@core/helpers/giros/girosHelper.ts

* @param offset Start position of result set. Must be an integer
* @returns
*/
getv2(endpoint: string, parameters?: { id?: any, query?: any, fields?: string[], sortby?: string[], order?: string[], limit?: number, offset?: number }) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ver lo comentado en src/app/@core/helpers/giros/girosHelper.ts respecto a parameters

@@ -13,6 +13,7 @@ export const environment = {
WSO2_SERVICE: 'https://autenticacion.portaloas.udistrital.edu.co/apioas/',
PLAN_CUENTAS_MONGO_SERVICE: 'https://autenticacion.portaloas.udistrital.edu.co/apioas/plan_cuentas_mongo_crud/v1/',
CUENTAS_CONTABLES_SERVICE: 'https://autenticacion.portaloas.udistrital.edu.co/apioas/cuentas_contables_crud/v1/',
TESORERIA_MID_SERVICE: 'http://pruebasapi2.intranetoas.udistrital.edu.co:8214/v1/',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Esto solo funcionaría bajo VPN, no se encuentra desplegado?
  • Ajustar no solo acá sino en el .test.ts y en el .prod.ts

@@ -14,6 +14,7 @@ export const environment = {
PLAN_CUENTAS_MONGO_SERVICE: 'https://autenticacion.portaloas.udistrital.edu.co/apioas/plan_cuentas_mongo_crud/v1/',
CUENTAS_CONTABLES_SERVICE: 'https://autenticacion.portaloas.udistrital.edu.co/apioas/cuentas_contables_crud/v1/',
CONFIGURACION_SERVICE: 'https://autenticacion.portaloas.udistrital.edu.co/apioas/configuracion_crud_api/v1/',
TESORERIA_MID_SERVICE: 'http://pruebasapi2.intranetoas.udistrital.edu.co:8214/v1/',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revisar lo comentado en src/environments/environment.ts

@salcedogeiner
Copy link
Contributor

se cierra PR ya que se continua desarrollo en otra rama

@AlexFBP AlexFBP deleted the feature/cuenta_bancaria branch February 8, 2022 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contabilidad Subsistema de Contabilidad development
Projects
None yet
3 participants