22 KiB
- Quiero que reestructures el código relativo a la parte web de los módulos. Es decir, el codigo que esá en el directorio:
modules/<nombre_modulo>/src/web/
Dentro de ese directorio, la estructura a seguir es crear subdirectorio por las "operaciones" que se pueden hacer. Por ejemplo, si el módulo fueran "facturas", la estructura sería algo así:
📁 modules/customer-invoices/src/web/
├── 📁 change-status
├── 📁 create
├── 📁 delete
├── 📁 list
├── 📁 ...
├── 📁 shared
├── 📁 update
└── 📄 index.ts
Fíjate que hay un directorio "shared". Ahí hay código compartido entre todas las "operaciones". Dentro del directorio de cada operación, hay que seguir también una estructura. Por ejemplo:
├── 📁 change-status
│ ├── 📁 controllers
│ │ ├── 📄 index.ts
│ │ └── 📄 use-change-proforma-status-dialog-controller.ts
│ ├── 📁 entities
│ │ ├── 📄 change-proforma-status-target.entity.ts
│ │ └── 📄 index.ts
│ ├── 📁 helpers
│ │ ├── 📄 index.ts
│ │ └── 📄 proforma-status-ui.ts
│ ├── 📁 ui
│ │ ├── 📁 components
│ │ │ ├── 📄 index.ts
│ │ │ ├── 📄 status-legend.tsx
│ │ │ ├── 📄 status-node.tsx
│ │ │ └── 📄 timeline-connector.tsx
│ │ ├── 📄 change-status-dialog.tsx
│ │ └── 📄 index.ts
│ ├── 📁 utils
│ │ ├── 📄 get-common-available-proforma-statuses.ts
│ │ ├── 📄 index.ts
│ │ └── 📄 prepare-change-proforma-status-targets.ts
│ └── 📄 index.ts
El arbol completo para este ejemplo de "facturas" quedaría así:
📁 modules/customer-invoices/src/web
├── 📁 change-status
│ ├── 📁 controllers
│ │ ├── 📄 index.ts
│ │ └── 📄 use-change-proforma-status-dialog-controller.ts
│ ├── 📁 entities
│ │ ├── 📄 change-proforma-status-target.entity.ts
│ │ └── 📄 index.ts
│ ├── 📁 helpers
│ │ ├── 📄 index.ts
│ │ └── 📄 proforma-status-ui.ts
│ ├── 📁 ui
│ │ ├── 📁 components
│ │ │ ├── 📄 index.ts
│ │ │ ├── 📄 status-legend.tsx
│ │ │ ├── 📄 status-node.tsx
│ │ │ └── 📄 timeline-connector.tsx
│ │ ├── 📄 change-status-dialog.tsx
│ │ └── 📄 index.ts
│ ├── 📁 utils
│ │ ├── 📄 get-common-available-proforma-statuses.ts
│ │ ├── 📄 index.ts
│ │ └── 📄 prepare-change-proforma-status-targets.ts
│ └── 📄 index.ts
├── 📁 create
│ ├── 📁 adapters
│ │ ├── 📄 build-create-proforma-params.test.ts
│ │ ├── 📄 build-create-proforma-params.ts
│ │ └── 📄 index.ts
│ ├── 📁 controllers
│ │ ├── 📄 index.ts
│ │ ├── 📄 use-create-proforma-controller.ts
│ │ └── 📄 use-create-proforma-page-controller.ts
│ ├── 📁 entities
│ │ ├── 📄 index.ts
│ │ ├── 📄 proforma-create-form.entity.ts
│ │ └── 📄 proforma-create-form.schema.ts
│ ├── 📁 ui
│ │ ├── 📁 blocks
│ │ │ ├── 📄 index.ts
│ │ │ ├── 📄 proforma-create-auto-applied-info.tsx
│ │ │ ├── 📄 proforma-create-customer-field.tsx
│ │ │ ├── 📄 proforma-create-form.tsx
│ │ │ ├── 📄 proforma-create-header.tsx
│ │ │ └── 📄 proforma-create-initial-info-card.tsx
│ │ ├── 📁 components
│ │ │ ├── 📄 index.ts
│ │ │ ├── 📄 proforma-create-skeleton.test.tsx
│ │ │ └── 📄 proforma-create-skeleton.tsx
│ │ ├── 📁 pages
│ │ │ ├── 📄 index.ts
│ │ │ └── 📄 proforma-create-page.tsx
│ │ └── 📄 index.ts
│ ├── 📁 utils
│ │ ├── 📄 build-proforma-create-default.ts
│ │ └── 📄 index.ts
│ └── 📄 index.ts
├── 📁 delete
│ ├── 📁 controllers
│ │ ├── 📄 index.ts
│ │ └── 📄 use-delete-proforma-dialog-controller.ts
│ ├── 📁 entities
│ │ ├── 📄 delete-proforma-target.entity.ts
│ │ └── 📄 index.ts
│ ├── 📁 ui
│ │ ├── 📁 components
│ │ │ ├── 📄 delete-proforma-dialog.tsx
│ │ │ └── 📄 index.ts
│ │ └── 📄 index.ts
│ ├── 📁 utils
│ │ ├── 📄 index.ts
│ │ └── 📄 prepare-delete-proforma-targets.ts
│ └── 📄 index.ts
├── 📁 detail
│ ├── 📁 controllers
│ │ ├── 📄 index.ts
│ │ ├── 📄 use-create-recurring-proforma-from-proforma-dialog-controller.test.tsx
│ │ ├── 📄 use-create-recurring-proforma-from-proforma-dialog-controller.ts
│ │ ├── 📄 use-create-recurring-proforma-from-proforma-dialog-controller.utils.test.ts
│ │ ├── 📄 use-create-recurring-proforma-from-proforma-dialog-controller.utils.ts
│ │ └── 📄 use-proforma-detail-page-controller.ts
│ ├── 📁 entities
│ │ ├── 📄 index.ts
│ │ └── 📄 proforma-detail-view-models.entity.ts
│ ├── 📁 ui
│ │ ├── 📁 blocks
│ │ │ ├── 📄 index.ts
│ │ │ ├── 📄 proforma-detail-content.tsx
│ │ │ ├── 📄 proforma-detail-header-actions.tsx
│ │ │ ├── 📄 proforma-detail-header.tsx
│ │ │ ├── 📄 proforma-detail-inspector.tsx
│ │ │ ├── 📄 proforma-document-pane.tsx
│ │ │ └── 📄 proforma-general-panel.tsx
│ │ ├── 📁 components
│ │ │ ├── 📄 create-recurring-proforma-from-proforma-dialog.test.tsx
│ │ │ ├── 📄 create-recurring-proforma-from-proforma-dialog.tsx
│ │ │ ├── 📄 index.ts
│ │ │ ├── 📄 proforma-detail-archived-badge.tsx
│ │ │ ├── 📄 proforma-detail-field.tsx
│ │ │ ├── 📄 proforma-detail-formatters.ts
│ │ │ ├── 📄 proforma-detail-header-meta.tsx
│ │ │ ├── 📄 proforma-detail-section.tsx
│ │ │ └── 📄 proforma-detail-skeleton.tsx
│ │ ├── 📁 pages
│ │ │ ├── 📄 index.ts
│ │ │ ├── 📄 proforma-detail-page.test.tsx
│ │ │ └── 📄 proforma-detail-page.tsx
│ │ ├── 📁 sections
│ │ │ ├── 📄 index.ts
│ │ │ ├── 📄 proforma-commercial-section.tsx
│ │ │ ├── 📄 proforma-content-section.tsx
│ │ │ ├── 📄 proforma-customer-section.tsx
│ │ │ ├── 📄 proforma-dates-section.tsx
│ │ │ ├── 📄 proforma-fiscal-section.tsx
│ │ │ ├── 📄 proforma-linked-invoice-section.tsx
│ │ │ └── 📄 proforma-summary-section.tsx
│ │ └── 📄 index.ts
│ ├── 📁 utils
│ │ ├── 📄 build-proforma-detail-actions.test.ts
│ │ ├── 📄 build-proforma-detail-actions.ts
│ │ ├── 📄 build-proforma-detail-page-error-view-model.test.ts
│ │ ├── 📄 build-proforma-detail-view-models.ts
│ │ └── 📄 index.ts
│ └── 📄 index.ts
├── 📁 download-pdf
│ ├── 📁 api
│ │ ├── 📄 download-proforma-pdf.api.ts
│ │ └── 📄 index.ts
│ ├── 📁 controller
│ │ ├── 📄 index.ts
│ │ └── 📄 use-download-proforma-pdf.controller.ts
│ ├── 📁 hooks
│ │ ├── 📄 index.ts
│ │ └── 📄 use-download-proforma-pdf-query.ts
│ └── 📄 index.ts
├── 📁 issue-proforma
│ ├── 📁 controllers
│ │ ├── 📄 index.ts
│ │ └── 📄 use-issue-proforma-dialog.controller.ts
│ ├── 📁 entities
│ │ ├── 📄 index.ts
│ │ └── 📄 issue-proforma-target.entity.ts
│ ├── 📁 ui
│ │ ├── 📄 index.ts
│ │ └── 📄 issue-proforma-dialog.tsx
│ ├── 📁 utils
│ │ ├── 📄 index.ts
│ │ └── 📄 prepare-issue-proforma-targets.ts
│ └── 📄 index.ts
├── 📁 list
│ ├── 📁 controllers
│ │ ├── 📄 index.ts
│ │ ├── 📄 use-list-proformas-page.controller.ts
│ │ ├── 📄 use-list-proformas.controller.ts
│ │ └── 📄 use-proforma-summary-panel.controller.ts
│ ├── 📁 entities
│ │ ├── 📄 index.ts
│ │ └── 📄 proforma-list-page-error-view-model.entity.ts
│ ├── 📁 types
│ │ └── 📄 proforma-list-filters.ts
│ ├── 📁 ui
│ │ ├── 📁 blocks
│ │ │ ├── 📁 proforma-summary-panel
│ │ │ │ ├── 📄 index.ts
│ │ │ │ ├── 📄 proforma-footer-actions.tsx
│ │ │ │ ├── 📄 proforma-header.tsx
│ │ │ │ ├── 📄 proforma-summary-content.tsx
│ │ │ │ ├── 📄 proforma-summary-panel.test.tsx
│ │ │ │ └── 📄 proforma-summary-panel.tsx
│ │ │ ├── 📁 proformas-grid
│ │ │ │ ├── 📄 index.ts
│ │ │ │ ├── 📄 proforma-row-actions.tsx
│ │ │ │ ├── 📄 proformas-grid.tsx
│ │ │ │ ├── 📄 use-proforma-grid-columns.test.tsx
│ │ │ │ └── 📄 use-proforma-grid-columns.tsx
│ │ │ └── 📄 index.ts
│ │ ├── 📁 components
│ │ │ ├── 📄 archive-proforma-dialog.tsx
│ │ │ ├── 📄 index.ts
│ │ │ ├── 📄 proforma-date-preset-filter.tsx
│ │ │ ├── 📄 proforma-status-badge.tsx
│ │ │ ├── 📄 proforma-status-segmented-filter.tsx
│ │ │ └── 📄 unarchive-proforma-dialog.tsx
│ │ ├── 📁 pages
│ │ │ ├── 📄 index.ts
│ │ │ ├── 📄 list-proformas-page.tsx
│ │ │ ├── 📄 orders-table.tsx
│ │ │ ├── 📄 scoped-list-proformas-page-view.test.tsx
│ │ │ └── 📄 scoped-list-proformas-page-view.tsx
│ │ └── 📄 index.ts
│ ├── 📁 utils
│ │ ├── 📄 build-list-proformas-criteria.test.ts
│ │ ├── 📄 build-list-proformas-criteria.ts
│ │ ├── 📄 build-proforma-date-range.test.ts
│ │ ├── 📄 build-proforma-date-range.ts
│ │ ├── 📄 build-proforma-list-page-error-view-model.test.ts
│ │ ├── 📄 build-proforma-list-page-error-view-model.ts
│ │ ├── 📄 resolve-proforma-date-preset.test.ts
│ │ ├── 📄 resolve-proforma-date-preset.ts
│ │ ├── 📄 resolve-proforma-list-feedback-state.test.ts
│ │ └── 📄 resolve-proforma-list-feedback-state.ts
│ └── 📄 index.ts
├── 📁 shared
│ ├── 📁 adapters
│ │ ├── 📄 get-proforma-by-id.adapter.ts
│ │ ├── 📄 get-proforma-issuance-readiness.adapter.ts
│ │ ├── 📄 index.ts
│ │ ├── 📄 list-document-series.adapter.ts
│ │ ├── 📄 list-proformas.adapter.ts
│ │ └── 📄 proforma-to-list-row-patch.adapter.ts
│ ├── 📁 api
│ │ ├── 📄 archive-proforma-by-id.api.ts
│ │ ├── 📄 change-proforma-status-by-id.api.ts
│ │ ├── 📄 create-proforma.api.ts
│ │ ├── 📄 delete-proforma-by-id.api.ts
│ │ ├── 📄 duplicate-proforma-by-id.api.ts
│ │ ├── 📄 get-proforma-by-id.api.ts
│ │ ├── 📄 get-proforma-issuance-readiness.api.ts
│ │ ├── 📄 index.ts
│ │ ├── 📄 issue-proforma-by-id.api.ts
│ │ ├── 📄 list-document-series.api.ts
│ │ ├── 📄 list-proformas-by-criteria.api.ts
│ │ ├── 📄 report-proforma-by-id.api.ts
│ │ ├── 📄 unarchive-proforma-by-id.api.test.ts
│ │ ├── 📄 unarchive-proforma-by-id.api.ts
│ │ └── 📄 update-proforma-by-id.api.ts
│ ├── 📁 constants
│ │ ├── 📄 index.ts
│ │ ├── 📄 payment-method-options.constants.ts
│ │ └── 📄 proforma-fiscal-options.constants.ts
│ ├── 📁 entities
│ │ ├── 📁 forms
│ │ │ ├── 📄 index.ts
│ │ │ └── 📄 proforma-item-form.entity.ts
│ │ ├── 📄 document-series-summary.entity.ts
│ │ ├── 📄 duplicate-proforma-result.entity.ts
│ │ ├── 📄 index.ts
│ │ ├── 📄 proforma-issuance-readiness.entity.ts
│ │ ├── 📄 proforma-item.entity.ts
│ │ ├── 📄 proforma-list-row.entity.ts
│ │ ├── 📄 proforma-list.entity.ts
│ │ ├── 📄 proforma-recipient.entity.ts
│ │ ├── 📄 proforma-status-counts.entity.ts
│ │ ├── 📄 proforma-status.entity.ts
│ │ ├── 📄 proforma-tax-summary.entity.ts
│ │ └── 📄 proforma.entity.ts
│ ├── 📁 hooks
│ │ ├── 📄 index.ts
│ │ ├── 📄 keys.ts
│ │ ├── 📄 proforma-cache-strategy.ts
│ │ ├── 📄 to-validation-errors.ts
│ │ ├── 📄 use-document-series-query.ts
│ │ ├── 📄 use-duplicate-proforma-by-id-mutation.ts
│ │ ├── 📄 use-proforma-archive-mutation.ts
│ │ ├── 📄 use-proforma-change-status-mutation.ts
│ │ ├── 📄 use-proforma-create-mutation.ts
│ │ ├── 📄 use-proforma-delete-mutation.ts
│ │ ├── 📄 use-proforma-get-query.ts
│ │ ├── 📄 use-proforma-issuance-readiness-query.ts
│ │ ├── 📄 use-proforma-issue-mutation.ts
│ │ ├── 📄 use-proforma-unarchive-mutation.ts
│ │ ├── 📄 use-proforma-update-mutation.ts
│ │ └── 📄 use-proformas-list-query.ts
│ ├── 📁 ui
│ │ ├── 📁 blocks
│ │ │ ├── 📄 index.ts
│ │ │ ├── 📄 proforma-issuance-readiness-alert.tsx
│ │ │ └── 📄 proforma-page-header.tsx
│ │ └── 📄 index.ts
│ ├── 📁 utils
│ │ ├── 📄 build-document-series-select-items.ts
│ │ ├── 📄 build-proforma-payment-term-select-items.test.ts
│ │ ├── 📄 build-proforma-payment-term-select-items.ts
│ │ ├── 📄 calculate-proforma-due-dates.ts
│ │ ├── 📄 ensure-current-value-in-select-items.ts
│ │ ├── 📄 index.ts
│ │ ├── 📄 proforma-fiscal-options.utils.ts
│ │ └── 📄 proforma-issuance-readiness.ts
│ └── 📄 index.ts
├── 📁 update
│ ├── 📁 adapters
│ │ ├── 📄 index.ts
│ │ ├── 📄 map-proforma-items-form-to-proforma-line-inpus.ts
│ │ ├── 📄 map-proforma-items-to-proforma-items-update-form.adapter.ts
│ │ ├── 📄 map-proforma-to-proforma-update-form.adapter.ts
│ │ └── 📄 map-proforma-to-selected-customer.adapter.ts
│ ├── 📁 controllers
│ │ ├── 📄 index.ts
│ │ ├── 📄 use-update-proforma-controller.ts
│ │ ├── 📄 use-update-proforma-customer-change-controller.ts
│ │ ├── 📄 use-update-proforma-items-controller.ts
│ │ ├── 📄 use-update-proforma-page-controller.ts
│ │ ├── 📄 use-update-proforma-payment-controller.ts
│ │ ├── 📄 use-update-proforma-tax-controller.ts
│ │ └── 📄 use-update-proforma-totals-controller.ts
│ ├── 📁 entities
│ │ ├── 📄 index.ts
│ │ ├── 📄 proforma-calculation.entity.ts
│ │ ├── 📄 proforma-item-update-form.entity.ts
│ │ ├── 📄 proforma-item-update-form.schema.ts
│ │ ├── 📄 proforma-item-update-patch.entity.ts
│ │ ├── 📄 proforma-update-form.entity.ts
│ │ ├── 📄 proforma-update-form.schema.test.ts
│ │ ├── 📄 proforma-update-form.schema.ts
│ │ ├── 📄 proforma-update-page-error-view-model.entity.ts
│ │ └── 📄 proforma-update-patch.entity.ts
│ ├── 📁 ui
│ │ ├── 📁 blocks
│ │ │ ├── 📁 selected-recipient
│ │ │ │ ├── 📄 customer-card.tsx
│ │ │ │ ├── 📄 customer-view-dialog.tsx
│ │ │ │ ├── 📄 index.ts
│ │ │ │ └── 📄 selected-recipient-summary.tsx
│ │ │ ├── 📄 editor-sidebar.tsx
│ │ │ ├── 📄 index.ts
│ │ │ ├── 📄 line-editor.test.tsx
│ │ │ ├── 📄 line-editor.tsx
│ │ │ ├── 📄 new-proforma-totals-summary.tsx
│ │ │ ├── 📄 proforma-compact-totals.tsx
│ │ │ ├── 📄 proforma-line-editor.tsx
│ │ │ ├── 📄 proforma-totals-summary.tsx
│ │ │ ├── 📄 proforma-update-header.test.tsx
│ │ │ └── 📄 proforma-update-header.tsx
│ │ ├── 📁 components
│ │ │ ├── 📄 index.ts
│ │ │ ├── 📄 proforma-info-alert.tsx
│ │ │ ├── 📄 proforma-update-customer-change-dialog.tsx
│ │ │ ├── 📄 proforma-update-help-popover.test.tsx
│ │ │ ├── 📄 proforma-update-help-popover.tsx
│ │ │ └── 📄 proforma-update-skeleton.tsx
│ │ ├── 📁 editors
│ │ │ ├── 📄 index.ts
│ │ │ ├── 📄 proforma-payment-editor.tsx
│ │ │ ├── 📄 proforma-settings-editor.tsx
│ │ │ ├── 📄 proforma-taxes-card.tsx
│ │ │ ├── 📄 proforma-update-editor-form.test.tsx
│ │ │ ├── 📄 proforma-update-editor-form.tsx
│ │ │ ├── 📄 proforma-update-header-editor.tsx
│ │ │ ├── 📄 proforma-update-item-row-editor.tsx
│ │ │ ├── 📄 proforma-update-items-editor.tsx
│ │ │ ├── 📄 proforma-update-items-totals.tsx
│ │ │ ├── 📄 proforma-update-recipient-editor.tsx
│ │ │ └── 📄 proforma-update-tax-editor.tsx
│ │ ├── 📁 pages
│ │ │ ├── 📄 index.ts
│ │ │ ├── 📄 proforma-update-page.test.tsx
│ │ │ └── 📄 proforma-update-page.tsx
│ │ └── 📄 index.ts
│ ├── 📁 utils
│ │ ├── 📁 calculations
│ │ │ ├── 📄 calculate-proforma-line-total.ts
│ │ │ ├── 📄 calculate-proforma-lines-totals.ts
│ │ │ ├── 📄 calculate-proforma-tax-breakdown.ts
│ │ │ ├── 📄 calculate-proforma-totals-from-lines.ts
│ │ │ ├── 📄 calculate-proportional-discount.ts
│ │ │ ├── 📄 index.ts
│ │ │ └── 📄 money-calculation.ts
│ │ ├── 📄 build-proforma-item-update-default.ts
│ │ ├── 📄 build-proforma-update-default.ts
│ │ ├── 📄 build-proforma-update-page-error-view-model.test.ts
│ │ ├── 📄 build-proforma-update-page-error-view-model.ts
│ │ ├── 📄 build-proforma-update-patch.ts
│ │ ├── 📄 build-update-proforma-by-id-params.test.ts
│ │ ├── 📄 build-update-proforma-by-id-params.ts
│ │ ├── 📄 calculate-proforma-totals.ts
│ │ ├── 📄 evaluate-proforma-customer-change.test.ts
│ │ ├── 📄 evaluate-proforma-customer-change.ts
│ │ ├── 📄 index.ts
│ │ ├── 📄 resolve-proforma-update-page-feedback-state.test.ts
│ │ └── 📄 resolve-proforma-update-page-feedback-state.ts
│ └── 📄 index.ts
└── 📄 index.ts
Quiero que hagas esta reestructuración pero antes pregunta todo lo que necesites para hacer el cambio bien a la primera.
-
En la lista de marcas, quiero poder incluir el logotipo. Como son marcas conocidas, rellena ese nuevo campo buscando en internet el logo correspondiente en formato SVG, sin fondo.
-
Quiero que en el navegador web del cliente se muestren rutas para seccion. Por ejemplo: http://192.168.0.2:5173/dashboard, http://192.168.0.2:5173/tickets, http://192.168.0.2:5173/companies/, http://192.168.0.2:5173/companies/xxxx, etc. Analiza qué estructura de ruta es la más adecuada las pantallas de la aplicación y muestrala antes de realizar ningún cambio. Intenta encontar ambiguedades o errores también. Como criterio, guíate por la lógica o por lo más común que se hace en este caso.
-
quiero que el estado plegado/desplegado de la barra lateral izquierda se almacene en el almacenamiento local del navegador para que se conserve entre sesiones.
-
revisa el codigo para localizar todos los ficheros en el backend que se refieran a value objetcs de DDD. Debes renombrarlos de esta manera:
email-address.ts => email-address.vo.ts unique-id.ts => unique-id.vo.ts