fam-archetype-app 0.0.1

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 (147) hide show
  1. package/README.md +38 -0
  2. package/package.json +25 -0
  3. package/src/collection.json +10 -0
  4. package/src/fam-archetype-app/files/.editorconfig +16 -0
  5. package/src/fam-archetype-app/files/.prettierignore +15 -0
  6. package/src/fam-archetype-app/files/.prettierrc.json +29 -0
  7. package/src/fam-archetype-app/files/LICENSE.md +21 -0
  8. package/src/fam-archetype-app/files/README.md +59 -0
  9. package/src/fam-archetype-app/files/angular.json.template +178 -0
  10. package/src/fam-archetype-app/files/cli +361 -0
  11. package/src/fam-archetype-app/files/eslint.config.js +89 -0
  12. package/src/fam-archetype-app/files/package-lock.json.template +18812 -0
  13. package/src/fam-archetype-app/files/package.json.template +62 -0
  14. package/src/fam-archetype-app/files/src/assets/fonts/DiBaScreen-Regular.woff2 +0 -0
  15. package/src/fam-archetype-app/files/src/assets/translations/translations-ca.json +284 -0
  16. package/src/fam-archetype-app/files/src/assets/translations/translations-en.json +28 -0
  17. package/src/fam-archetype-app/files/src/assets/translations/translations-es.json +28 -0
  18. package/src/fam-archetype-app/files/src/core/layout/component/footer/footer.component.html.template +3 -0
  19. package/src/fam-archetype-app/files/src/core/layout/component/footer/footer.component.scss +8 -0
  20. package/src/fam-archetype-app/files/src/core/layout/component/layout/layout.component.html +19 -0
  21. package/src/fam-archetype-app/files/src/core/layout/component/layout/layout.component.scss +28 -0
  22. package/src/fam-archetype-app/files/src/core/layout/component/main-info-popup/main-info-popup.component.html +33 -0
  23. package/src/fam-archetype-app/files/src/core/layout/component/main-info-popup/main-info-popup.component.scss +3 -0
  24. package/src/fam-archetype-app/files/src/core/layout/component/menu/menu.component.html +3 -0
  25. package/src/fam-archetype-app/files/src/core/layout/component/menu/menu.component.scss +163 -0
  26. package/src/fam-archetype-app/files/src/core/layout/component/menuitem/menuitem.component.html +39 -0
  27. package/src/fam-archetype-app/files/src/core/layout/component/menuitem/menuitem.component.scss +44 -0
  28. package/src/fam-archetype-app/files/src/core/layout/component/not-found/not-found.component.html +12 -0
  29. package/src/fam-archetype-app/files/src/core/layout/component/not-found/not-found.component.scss +17 -0
  30. package/src/fam-archetype-app/files/src/core/layout/component/sidebar/sidebar.component.html +13 -0
  31. package/src/fam-archetype-app/files/src/core/layout/component/sidebar/sidebar.component.scss +33 -0
  32. package/src/fam-archetype-app/files/src/core/layout/component/top-menu/top-menu.component.html +12 -0
  33. package/src/fam-archetype-app/files/src/core/layout/component/top-menu/top-menu.component.scss +9 -0
  34. package/src/fam-archetype-app/files/src/core/layout/component/topbar/_mixins.scss +8 -0
  35. package/src/fam-archetype-app/files/src/core/layout/component/topbar/topbar.component.html.template +45 -0
  36. package/src/fam-archetype-app/files/src/core/layout/component/topbar/topbar.component.scss +77 -0
  37. package/src/fam-archetype-app/files/src/environments/environment.dev.ts.template +12 -0
  38. package/src/fam-archetype-app/files/src/environments/environment.int.ts.template +12 -0
  39. package/src/fam-archetype-app/files/src/environments/environment.pre.ts.template +12 -0
  40. package/src/fam-archetype-app/files/src/environments/environment.ts.template +12 -0
  41. package/src/fam-archetype-app/files/src/index.html.template +18 -0
  42. package/src/fam-archetype-app/files/src/shared/filters/diba-filters/diba-filters.component.html +69 -0
  43. package/src/fam-archetype-app/files/src/shared/filters/diba-filters/diba-filters.component.scss +0 -0
  44. package/src/fam-archetype-app/files/src/shared/styles/_movements.scss +19 -0
  45. package/src/fam-archetype-app/files/src/shared/styles/global/_core.scss +20 -0
  46. package/src/fam-archetype-app/files/src/shared/styles/global/_icons.scss +37 -0
  47. package/src/fam-archetype-app/files/src/shared/styles/global/_tooltips.scss +14 -0
  48. package/src/fam-archetype-app/files/src/shared/styles/global/_typography.scss +68 -0
  49. package/src/fam-archetype-app/files/src/shared/styles/global/_utils.scss +24 -0
  50. package/src/fam-archetype-app/files/src/shared/styles/global/layout.scss +5 -0
  51. package/src/fam-archetype-app/files/src/shared/table/column-visibility-selector/column-visibility-selector.component.html +10 -0
  52. package/src/fam-archetype-app/files/src/shared/table/column-visibility-selector/column-visibility-selector.component.scss +0 -0
  53. package/src/fam-archetype-app/files/src/shared/table/diba-table/diba-table.component.html +136 -0
  54. package/src/fam-archetype-app/files/src/shared/table/diba-table/diba-table.component.scss +0 -0
  55. package/src/fam-archetype-app/files/src/styles.scss +109 -0
  56. package/src/fam-archetype-app/files/src/tailwind.css +3 -0
  57. package/src/fam-archetype-app/files/tailwind.config.js +36 -0
  58. package/src/fam-archetype-app/files/tools/cli/TelosysTools/commands/commands.txt +1 -0
  59. package/src/fam-archetype-app/files/tools/cli/TelosysTools/commands/db_to_entities.txt +1 -0
  60. package/src/fam-archetype-app/files/tools/cli/TelosysTools/commands/test_db_connection.txt +1 -0
  61. package/src/fam-archetype-app/files/tools/cli/TelosysTools/databases.yaml +188 -0
  62. package/src/fam-archetype-app/files/tools/cli/TelosysTools/downloads/.keep +0 -0
  63. package/src/fam-archetype-app/files/tools/cli/TelosysTools/lib/.keep +0 -0
  64. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamActivitat.entity +26 -0
  65. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamActivitatsUbicacio.entity +40 -0
  66. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamAlumne.entity +76 -0
  67. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamArea.entity +33 -0
  68. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamComanda.entity +37 -0
  69. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamCurs.entity +50 -0
  70. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamDocument.entity +53 -0
  71. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamDocumentTipus.entity +26 -0
  72. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamEntitatBase.entity +84 -0
  73. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamExpedient.entity +71 -0
  74. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamExpedientDocument.entity +51 -0
  75. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamExpedientEstat.entity +26 -0
  76. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamExpedientTipus.entity +26 -0
  77. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamJerarquia.entity +33 -0
  78. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamLinia.entity +56 -0
  79. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamMatricula.entity +63 -0
  80. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamTipusArticle.entity +26 -0
  81. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamUbicacio.entity +35 -0
  82. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamZona.entity +27 -0
  83. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/Funcionalitat.entity +65 -0
  84. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FuncionalitatGrupFunc.entity +58 -0
  85. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/GrupFuncionalitat.entity +54 -0
  86. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/PerfilGrupFuncionalitat.entity +50 -0
  87. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/VusPerfil.entity +31 -0
  88. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/model.yaml +4 -0
  89. package/src/fam-archetype-app/files/tools/cli/TelosysTools/telosys-tools.cfg +31 -0
  90. package/src/fam-archetype-app/files/tools/cli/TelosysTools/telosys.env +5 -0
  91. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/README.md +12 -0
  92. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/database.properties +23 -0
  93. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/include/init_var_entity.vm +169 -0
  94. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/include/macros.vm +218 -0
  95. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/app_config_ts.vm +56 -0
  96. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/app_routes_ts.vm +21 -0
  97. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/core/layout/component/menu/menu_component_ts.vm +30 -0
  98. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/core/layout/component/top-menu/top-menu_component_ts.vm +36 -0
  99. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/core/layout/service/menu_model_service_ts.vm +49 -0
  100. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/application/create-Xxx_use-case_ts.vm +18 -0
  101. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/application/create-file-Xxx_use-case_ts.vm +17 -0
  102. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/application/delete-Xxx_use-case_ts.vm +17 -0
  103. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/application/download-Xxx-file_use-case_ts.vm +24 -0
  104. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/application/find-Xxx_use-case_ts.vm +18 -0
  105. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/application/search-Xxx_use-case_ts.vm +25 -0
  106. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/application/update-Xxx_use-case_ts.vm +18 -0
  107. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/domain/Xxx_entity_ts.vm +36 -0
  108. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/domain/Xxx_repository_interface_ts.vm +27 -0
  109. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/mappers/Xxx_jsona_mapper_ts.vm +52 -0
  110. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/mappers/Xxx_mapper_ts.vm +36 -0
  111. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/Xxx_routes_ts.vm +15 -0
  112. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/detail/Xxx_detail_html.vm +178 -0
  113. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/detail/Xxx_detail_scss.vm +0 -0
  114. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/detail/Xxx_detail_spec_ts.vm +29 -0
  115. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/detail/Xxx_detail_ts.vm +382 -0
  116. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/list/Xxx_list_html.vm +37 -0
  117. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/list/Xxx_list_scss.vm +10 -0
  118. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/list/Xxx_list_spec_ts.vm +29 -0
  119. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/list/Xxx_list_ts.vm +430 -0
  120. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/resources/Xxx_resource_ts.vm +43 -0
  121. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/outbound/Xxx_repository_impl_ts.vm +162 -0
  122. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/test_code.vm +3 -0
  123. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/templates.cfg +52 -0
  124. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/tools-test/test-api_Xxx_rest.vm +181 -0
  125. package/src/fam-archetype-app/files/tools/cli/telosys +5 -0
  126. package/src/fam-archetype-app/files/tools/cli/telosys-cli-4.2.0-001.jar +0 -0
  127. package/src/fam-archetype-app/files/tools/cli/telosys-cli.cfg +55 -0
  128. package/src/fam-archetype-app/files/tools/cli/telosys-term.sh +30 -0
  129. package/src/fam-archetype-app/files/tools/cli/telosys.bat +4 -0
  130. package/src/fam-archetype-app/files/tools/cli/telosys.ico +0 -0
  131. package/src/fam-archetype-app/files/tools/db/develop/data/.keep +0 -0
  132. package/src/fam-archetype-app/files/tools/db/production/data/.keep +0 -0
  133. package/src/fam-archetype-app/files/tools/db/production/migrations/.keep +0 -0
  134. package/src/fam-archetype-app/files/tools/docs/.keep +0 -0
  135. package/src/fam-archetype-app/files/tools/test/test-api.rest +80 -0
  136. package/src/fam-archetype-app/files/tsconfig.app.json +15 -0
  137. package/src/fam-archetype-app/files/tsconfig.json +42 -0
  138. package/src/fam-archetype-app/files/tsconfig.spec.json +15 -0
  139. package/src/fam-archetype-app/files/vercel.json +9 -0
  140. package/src/fam-archetype-app/index.d.ts +2 -0
  141. package/src/fam-archetype-app/index.js +18 -0
  142. package/src/fam-archetype-app/index.js.map +1 -0
  143. package/src/fam-archetype-app/index_spec.d.ts +1 -0
  144. package/src/fam-archetype-app/index_spec.js +23 -0
  145. package/src/fam-archetype-app/index_spec.js.map +1 -0
  146. package/src/fam-archetype-app/schema.json +21 -0
  147. package/tsconfig.json +24 -0
@@ -0,0 +1,37 @@
1
+ .pi {
2
+ font-size: 3rem;
3
+ }
4
+
5
+ .layout-topbar-action {
6
+ display: inline-flex;
7
+ justify-content: center;
8
+ align-items: center;
9
+ border-radius: 50%;
10
+ width: 2.5rem;
11
+ height: 2.5rem;
12
+ color: var(--p-text-color);
13
+ transition: background-color var(--p-transition-duration);
14
+ cursor: pointer;
15
+
16
+ &:hover {
17
+ background-color: var(--p-content-hover-background);
18
+ }
19
+
20
+ i {
21
+ font-size: 1rem;
22
+ }
23
+
24
+ span {
25
+ font-size: 1rem;
26
+ display: none;
27
+ }
28
+
29
+ &.layout-topbar-action-highlight {
30
+ background-color: var(--p-primary-color);
31
+ color: var(--p-primary-contrast-color);
32
+ }
33
+
34
+ fa-icon {
35
+ color: var(--p-primary-color);
36
+ }
37
+ }
@@ -0,0 +1,14 @@
1
+ .p-tooltip .p-tooltip-text {
2
+ background-color: var(--p-content-background) !important;
3
+ color: var(--p-text-color) !important;
4
+ font-size: .75rem !important;
5
+ min-width: 14rem;
6
+ }
7
+
8
+ .p-tooltip .p-tooltip-arrow {
9
+ border-top-color: var(--p-content-background) !important; // si la posición es 'top'
10
+ }
11
+
12
+ .p-tooltip-bottom .p-tooltip-arrow {
13
+ border-bottom-color: var(--p-content-background) !important;
14
+ }
@@ -0,0 +1,68 @@
1
+ h1,
2
+ h2,
3
+ h3,
4
+ h4,
5
+ h5,
6
+ h6 {
7
+ margin: 1.5rem 0 1rem 0;
8
+ font-family: inherit;
9
+ font-weight: 700;
10
+ line-height: 1.5;
11
+ color: var(--p-text-color);
12
+
13
+ &:first-child {
14
+ margin-top: 0;
15
+ }
16
+ }
17
+
18
+ h1 {
19
+ font-size: 2.5rem;
20
+ }
21
+
22
+ h2 {
23
+ font-size: 2rem;
24
+ }
25
+
26
+ h3 {
27
+ font-size: 1.75rem;
28
+ }
29
+
30
+ h4 {
31
+ font-size: 1.5rem;
32
+ }
33
+
34
+ h5 {
35
+ font-size: 1.25rem;
36
+ }
37
+
38
+ h6 {
39
+ font-size: 1rem;
40
+ }
41
+
42
+ mark {
43
+ background: #fff8e1;
44
+ padding: 0.25rem 0.4rem;
45
+ border-radius: var(--p-content-border-radius);
46
+ font-family: monospace;
47
+ }
48
+
49
+ blockquote {
50
+ margin: 1rem 0;
51
+ padding: 0 2rem;
52
+ border-left: 4px solid #90a4ae;
53
+ }
54
+
55
+ hr {
56
+ border-top: solid var(--p-content-border-color);
57
+ border-width: 1px 0 0 0;
58
+ margin: 1rem 0;
59
+ }
60
+
61
+ p {
62
+ margin: 0 0 1rem 0;
63
+ line-height: 1.5;
64
+
65
+ &:last-child {
66
+ margin-bottom: 0;
67
+ }
68
+ }
@@ -0,0 +1,24 @@
1
+ .clearfix:after {
2
+ content: ' ';
3
+ display: block;
4
+ clear: both;
5
+ }
6
+
7
+ .card {
8
+ background: var(--p-content-background);
9
+ padding: 2rem;
10
+ margin-bottom: 2rem;
11
+ border-radius: var(--p-content-border-radius);
12
+
13
+ &:last-child {
14
+ margin-bottom: 0;
15
+ }
16
+ }
17
+
18
+ .p-toast {
19
+ &.p-toast-top-right,
20
+ &.p-toast-top-left,
21
+ &.p-toast-top-center {
22
+ top: 100px;
23
+ }
24
+ }
@@ -0,0 +1,5 @@
1
+ @use './_core';
2
+ @use './_utils';
3
+ @use './_typography';
4
+ @use './icons';
5
+ @use './_tooltips';
@@ -0,0 +1,10 @@
1
+ <p-multiselect
2
+ [options]="availableColumns()"
3
+ [ngModel]="selectedColumns()"
4
+ (onChange)="selectedColumns.set($event.value)"
5
+ [maxSelectedLabels]="maxSelectedLabels()"
6
+ optionLabel="label"
7
+ placeholder="Selecciona columnes"
8
+ fluid
9
+ >
10
+ </p-multiselect>
@@ -0,0 +1,136 @@
1
+ <!-- diba-table.component.html -->
2
+ <div class="diba-table max-w-[95vw]" [class.hidden]="loading">
3
+ <div class="flex justify-between">
4
+ <div class="flex justify-start">
5
+ <div class="select-rows flex justify-start items-center mb-2 mt-2">
6
+ <label for="rowsPerPage" class="mr-2">{{ 'Mostra' | primengTranslation }}</label>
7
+ <p-select [options]="rowsPerPageOptions" [(ngModel)]="rows" [style]="{'width':'80px'}" placeholder="Files"
8
+ inputId="rowsPerPage" />
9
+ <label for="rowsPerPage" class="ml-2 mr-2">{{ 'registres' | primengTranslation }}</label>
10
+ </div>
11
+ <div class ="select-columns mb-2 mt-2">
12
+ <p-multiSelect
13
+ [options]="optionsColumns"
14
+ [(ngModel)]="columnasMostrar"
15
+ optionLabel="header"
16
+ placeholder="Choose Columns"
17
+ (onChange)="onColumnVisibilityChange()"
18
+ [selectedItemsLabel]="'Columnes visibles'"
19
+ [showToggleAll]="false"
20
+ [showClear]="false">
21
+
22
+ <!-- Cerrado: hasta 3 con comas; si >3, texto fijo -->
23
+ <ng-template pTemplate="selectedItems" let-items>
24
+ <ng-container *ngIf="(items?.length || 0) > 0">
25
+ <ng-container *ngIf="items.length <= 3; else many">
26
+ <span *ngFor="let opt of items; let last = last; trackBy: trackByField">
27
+ {{ opt.header | primengTranslation }}<ng-container *ngIf="!last">, </ng-container>
28
+ </span>
29
+ </ng-container>
30
+ <ng-template #many>
31
+ {{ 'Columnes visibles' | primengTranslation }}
32
+ </ng-template>
33
+ </ng-container>
34
+ <ng-container *ngIf="!(items?.length)">
35
+ {{ 'Columnes visibles' | primengTranslation }}
36
+ </ng-container>
37
+ </ng-template>
38
+
39
+ <!-- Plantilla para la etiqueta del chip -->
40
+ <ng-template let-selected pTemplate="selectedItem">
41
+ {{ selected.header | primengTranslation }}
42
+ </ng-template>
43
+ </p-multiSelect>
44
+ </div>
45
+ </div>
46
+ <div class="mt-2 inline-flex">
47
+ <div>
48
+ <!-- Navegación normal -->
49
+ <p-button class="btn-primary-diba mr-2"
50
+ *ngIf="!embedded"
51
+ type="button"
52
+ label="{{ 'Crea' | primengTranslation }}"
53
+ severity="success"
54
+ [routerLink]="'new'">
55
+ <i class="fa-solid fa-plus"></i></p-button>
56
+ <!-- Modo embebido: abre popup de creación -->
57
+ <p-button
58
+ *ngIf="embedded"
59
+ class="btn-primary-diba mr-2"
60
+ type="button"
61
+ label="{{ 'Crea' | primengTranslation }}"
62
+ severity="success"
63
+ (onClick)="openCreatePopup($event)">
64
+ <i class="fa-solid fa-plus"></i>
65
+ </p-button>
66
+ </div>
67
+ <div>
68
+ <p-confirmdialog />
69
+ <p-button class="btn-primary-diba"
70
+ type="button"
71
+ label="{{ 'Elimina' | primengTranslation }}"
72
+ severity="success"
73
+ (onClick)="handleDelete($event)"
74
+ [disabled]="!selectedItems || selectedItems.length === 0">
75
+ <i class="fa-solid fa-trash"></i></p-button>
76
+ </div>
77
+ </div>
78
+ </div>
79
+ <p-table #dt [value]="data" [(selection)]="selectedItems" dataKey="id" [paginator]="true" [rows]="rows"
80
+ [resizableColumns]="true" [reorderableColumns]="true" [rowsPerPageOptions]="rowsPerPageOptions"
81
+ [sortMode]="'multiple'" [(multiSortMeta)]="multiSortMeta" [totalRecords]="totalRecords" [lazy]="true"
82
+ [columns]="columnasMostrar"
83
+ (onPage)="handlePage($event)" (onSort)="handleSort($event)" class="p-datatable-sm">
84
+ <ng-template pTemplate="header">
85
+ <tr>
86
+ <th style="width: 4rem" class="select-row-header" *ngIf="selectRows" pResizableColum><p-tableHeaderCheckbox /></th>
87
+ <th *ngFor="let col of columnasMostrar" pSortableColumn="{{col.field}}" pResizableColumn pReorderableColumn>
88
+ {{ col.header | primengTranslation }}
89
+ <p-sortIcon field="{{col}}"></p-sortIcon>
90
+ </th>
91
+ <th class="header-actions" style="width: 4rem" >
92
+ {{ 'Accions' | primengTranslation }}
93
+ </th>
94
+ </tr>
95
+ </ng-template>
96
+ <ng-template pTemplate="body" let-row>
97
+ <tr>
98
+ <td *ngIf="selectRows">
99
+ <p-tableCheckbox [value]="row" />
100
+ </td>
101
+ <td *ngFor="let col of columnasMostrar" [ngClass]="getAlignmentClass(col)">
102
+ <!-- Navegación normal -->
103
+ <a *ngIf="col.field == linkColumn && col.type !== 'file' && !embedded"
104
+ [routerLink]="[row.id]"
105
+ [innerHTML]="row | renderCell: col.field : col.type : col.pipe">
106
+ </a>
107
+ <!-- Modo embebido: abre popup -->
108
+ <a *ngIf="col.field == linkColumn && col.type !== 'file' && embedded"
109
+ href=""
110
+ (click)="openEditPopup(row.id, $event)"
111
+ [innerHTML]="row | renderCell: col.field : col.type : col.pipe">
112
+ </a>
113
+ <span *ngIf="col.field !== linkColumn && col.type !== 'file'" [innerHTML]="row | renderCell: col.field : col.type : col.pipe"></span>
114
+ <span *ngIf="col.field !== linkColumn && col.type == 'file'" [innerHTML]="row | renderCell: col.field : col.type : col.pipe" (click)="onTableClick($event)"></span>
115
+ </td>
116
+ <td class="actions">
117
+ <p-button class="btn-primary-diba" type="button" icon="fa-solid fa-trash"
118
+ (onClick)="handleDeleteRow(row.id)" [disabled]="!row.id"></p-button>
119
+ </td>
120
+ </tr>
121
+ </ng-template>
122
+ <!-- Paginador izquierda -->
123
+ <ng-template pTemplate="paginatorleft" let-state>
124
+ <span class="">
125
+ {{ 'Mostrant de' | primengTranslation }} {{ state.first + 1 }} {{ 'a' | primengTranslation }} {{ state.first +
126
+ state.rows < state.totalRecords ? state.first + state.rows : state.totalRecords }} {{ 'de' | primengTranslation }}
127
+ {{ state.totalRecords }} {{ 'registres' | primengTranslation }} </span>
128
+ </ng-template>
129
+ </p-table>
130
+ </div>
131
+ <div class="diba-loading flex items-center justify-center h-64" [class.hidden]="!loading">
132
+ <button class="btn btn-primary rounded-pill mx-auto w-fit" type="button" disabled="">
133
+ <span class="spinner-border spinner-border-sm" aria-hidden="true"></span>
134
+ <span class="ms-1" role="status">Carregant...</span>
135
+ </button>
136
+ </div>
@@ -0,0 +1,109 @@
1
+ /* You can add global styles to this file, and also import other style files */
2
+ @use './tailwind.css';
3
+ @use './shared/styles/global/layout.scss';
4
+ @use 'primeicons/primeicons.css';
5
+
6
+ @font-face {
7
+ font-family: 'DiBa';
8
+ src: url('/assets/fonts/DiBaScreen-Regular.woff2') format('woff2');
9
+ font-weight: normal;
10
+ font-style: normal;
11
+ font-display: swap; /* Mejora el rendimiento */
12
+ }
13
+
14
+ .diba-form {
15
+ border: 1px solid #d1d1d1;
16
+ border-radius: 1rem;
17
+ padding: .75rem;
18
+ background-color: #f9f8f8;
19
+
20
+ @apply grid grid-cols-1 gap-4 w-full;
21
+
22
+ .diba-form-field {
23
+ @apply flex items-start space-x-2;
24
+
25
+ label {
26
+ @apply w-[12.5%] text-left mt-2;
27
+ }
28
+
29
+ input, p-select, textarea, p-inputnumber, p-datepicker, p-checkbox {
30
+ @apply w-full;
31
+ max-width: 36%;
32
+ }
33
+ }
34
+
35
+ .diba-form-field-textarea {
36
+ align-items: flex-start !important;
37
+ }
38
+ }
39
+
40
+ .diba-form-two-column {
41
+ @apply grid grid-cols-1 md:grid-cols-2 gap-4 w-full !important;
42
+
43
+ .diba-form-field {
44
+ input, p-select, textarea, p-inputnumber, p-datepicker, p-checkbox {
45
+ max-width: none !important;
46
+ }
47
+ }
48
+ }
49
+
50
+ .diba-form-stacking.diba-form-two-column {
51
+ .diba-form-field {
52
+ @apply w-full !important;
53
+
54
+ input, p-select, textarea, p-inputnumber, p-datepicker, p-checkbox {
55
+ max-width: 100% !important;
56
+ }
57
+ }
58
+ }
59
+
60
+ /* NUEVA clase para este comportamiento */
61
+ .diba-form-two-column-flow {
62
+ /* anula el grid si venía de otra clase */
63
+ display: block !important;
64
+ column-count: 2;
65
+ column-gap: 1.5rem; /* separación entre columnas */
66
+ border: 1px solid #d1d1d1;
67
+ border-radius: 1rem;
68
+ padding: .75rem;
69
+ background-color: #f9f8f8;
70
+ }
71
+
72
+ .diba-form-two-column-flow .diba-form-field {
73
+ width: 100%;
74
+ padding: .5rem 0; /* separación vertical entre campos */
75
+ }
76
+
77
+ .diba-form-two-column-flow .diba-form-field label {
78
+ min-width: 25%;
79
+ }
80
+
81
+ .diba-form-two-column-flow .diba-form-field .p-inputtext,
82
+ .diba-form-two-column-flow .diba-form-field .p-textarea,
83
+ .diba-form-two-column-flow .diba-form-field .p-select {
84
+ max-width: 73%;
85
+ width: 100%;
86
+ }
87
+
88
+
89
+ .diba-form-stacking {
90
+ @apply grid grid-cols-1 gap-4 w-full;
91
+
92
+ .diba-form-field {
93
+ @apply w-1/2;
94
+
95
+ label {
96
+ @apply w-full text-left mb-2;
97
+ }
98
+
99
+ input, p-select {
100
+ @apply w-full;
101
+ }
102
+ }
103
+
104
+ .diba-form-field-textarea {
105
+ textarea {
106
+ width: 100% !important;
107
+ }
108
+ }
109
+ }
@@ -0,0 +1,3 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
@@ -0,0 +1,36 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ const primeui = require('tailwindcss-primeui');
3
+ module.exports = {
4
+ darkMode: ['selector', '[class="app-dark"]'],
5
+ content: ['./src/**/*.{html,ts,scss,css}', './index.html'],
6
+ plugins: [primeui],
7
+ theme: {
8
+ screens: {
9
+ sm: '576px',
10
+ md: '768px',
11
+ lg: '992px',
12
+ xl: '1200px',
13
+ '2xl': '1920px'
14
+ },
15
+ extend: {
16
+ fontFamily: {
17
+ DiBa: ['DiBa', 'Lato', 'sans-serif'],
18
+ },
19
+ colors: {
20
+ gray: {
21
+ 0: '#f1f3f5',
22
+ 50: '#e0e3e7',
23
+ 100: '#f7f7f7',
24
+ 200: '#c8cdd2',
25
+ 300: '#b0b7bd',
26
+ 400: '#98a1a8',
27
+ 500: '#828b92',
28
+ 600: '#6c757d',
29
+ 700: '#5a6269',
30
+ 800: '#484f55',
31
+ 900: '#5c636a',
32
+ }
33
+ }
34
+ },
35
+ }
36
+ };
@@ -0,0 +1,188 @@
1
+ # Telosys databases configuration
2
+ #
3
+ # . id : must be unique (database identifier)
4
+ #
5
+ # "metadata" configuration :
6
+ # . catalog : the catalog where to search the metadata ( "!" means "null" )
7
+ # . schema : the schema where to search the metadata ( "!" means "null" )
8
+ # . tableNamePattern : the pattern used as table name filter ( ex : "%", "A%", ... )
9
+ # . tableTypes : the types to retrieve, separated by blanks ( ex : "TABLE", "TABLE VIEW", ... )
10
+ # . tableNameExclude : the pattern used to exclude tables
11
+ # . tableNameInclude : the pattern used to include tables
12
+ #
13
+ # NB: this a YAML file, don't forget to use QUOTES when a special character is used
14
+
15
+ databases :
16
+
17
+ # ============================================
18
+ # H2 database identified by "h2" - H2 embedded ( ':jdbc:h2:mem:' = 'in memory' )
19
+ - id: h2
20
+ name: my H2 database
21
+ type: H2
22
+ # JDBC connection
23
+ # H2 embedded file storage : jdbc:h2:[file:][<path>]<databaseName>
24
+ # H2 embedded in-memory : jdbc:h2:mem:<databaseName>
25
+ # H2 remote file storage : jdbc:h2:tcp://<server>[:<port>]/[<path>]<databaseName>
26
+ # H2 remote in-memory : jdbc:h2:tcp://<server>[:<port>]/mem:<databaseName>
27
+ # H2 remote SSL : replace "tcp" by "ssl"
28
+ # url: jdbc:h2:mem:mydatabase;DB_CLOSE_DELAY=0
29
+ url: jdbc:h2:mem:mydatabase;DB_CLOSE_DELAY=0
30
+ driver: org.h2.Driver
31
+ user: sa
32
+ password:
33
+ # Metadata parameters
34
+ catalog: '!'
35
+ schema: '!'
36
+ tableNamePattern:
37
+ tableNameInclude:
38
+ tableNameExclude:
39
+ tableTypes:
40
+
41
+ #--- Telosys model creation
42
+ # what kind of links to define in the model
43
+ linksManyToOne: true
44
+ linksOneToMany: false
45
+ linksManyToMany: false
46
+ # what kind of database information to define in the model (true for all by default)
47
+ # dbComment: false # table & column -> entity & attribute
48
+ # dbCatalog: false # table -> entity
49
+ # dbSchema: false # table -> entity
50
+ # dbTable: false # table -> entity
51
+ # dbView: false # table -> entity
52
+ # dbName: false # column -> attribute
53
+ # dbType: false # column -> attribute
54
+ # dbDefaultValue: false # column -> attribute
55
+
56
+ # ============================================
57
+ # PostgreSQL database identified by "pg"
58
+ - id: pg
59
+ name: PostgreSQL database
60
+ type: POSTGRESQL
61
+ # JDBC driver
62
+ driver: org.postgresql.Driver
63
+ # JDBC url: jdbc:postgresql://{HOST}:{PORT}/{DATABASE}
64
+ url: jdbc:postgresql://myhost:5432/mydatabase
65
+ user: bob
66
+ password: secret
67
+ # Metadata parameters
68
+ catalog: '!'
69
+ # schema: '!' ok to get tables but not to get columns, etc
70
+ schema: public
71
+ tableNamePattern:
72
+ tableNameInclude:
73
+ tableNameExclude:
74
+ tableTypes: TABLE
75
+ #--- Telosys model creation
76
+ # what kind of links to define in the model
77
+ linksManyToOne: true
78
+ linksOneToMany: false
79
+ linksManyToMany: false
80
+ # what kind of database information to define in the model (true for all by default)
81
+ dbComment: false
82
+ dbCatalog : true
83
+ dbSchema : true
84
+ dbTable : true
85
+ dbView : false
86
+ dbName : true
87
+ dbType : true
88
+ dbDefaultValue: false
89
+
90
+ # ============================================
91
+ # Oracle database identified by "oracle"
92
+ - id: oracle
93
+ name: Oracle database
94
+ type: oracle
95
+ # JDBC driver
96
+ driver: oracle.jdbc.OracleDriver
97
+ # JDBC connection
98
+ # url for SID: jdbc:oracle:thin:@[HOST][:PORT]:SID (older format)
99
+ # url for SERVICE: jdbc:oracle:thin:@[HOST][:PORT]/SERVICE (newer format)
100
+ url: jdbc:oracle:thin:@localhost:1521/MYDBSERVICE
101
+ user: SCOTT
102
+ password: TIGER
103
+ # Metadata parameters
104
+ catalog: '!'
105
+ schema: MYSCHEMA
106
+ tableNamePattern: '%'
107
+ tableNameInclude:
108
+ tableNameExclude:
109
+ tableTypes: TABLE
110
+ #--- Telosys model creation
111
+ # what kind of links to define in the model
112
+ linksManyToOne: true
113
+ linksOneToMany: false
114
+ linksManyToMany: false
115
+ # what kind of database information to define in the model (true for all by default)
116
+ dbComment: false
117
+ dbCatalog : true
118
+ dbSchema : true
119
+ dbTable : true
120
+ dbView : false
121
+ dbName : true
122
+ dbType : true
123
+ dbDefaultValue: false
124
+ # ============================================
125
+ # Derby database identified by "derby"
126
+ - id: derby
127
+ name: my Derby database
128
+ type: Derby
129
+ # JDBC connection
130
+ driver: org.apache.derby.jdbc.ClientDriver
131
+ url: jdbc:derby://localhost:1527/mydatabase;create=true
132
+ user: root
133
+ password: admin
134
+ schema: ROOT
135
+ # Metadata parameters
136
+ catalog:
137
+ schema:
138
+ tableNamePattern:
139
+ tableNameInclude:
140
+ tableNameExclude:
141
+ tableTypes:
142
+ #--- Telosys model creation
143
+ # what kind of links to define in the model
144
+ linksManyToOne: true
145
+ linksOneToMany: false
146
+ linksManyToMany: false
147
+
148
+ # ============================================
149
+ # MYSQL (the JDBC Driver is in "mysql-connector-java-x.x.x-bin.jar")
150
+ # driver: com.mysql.jdbc.Driver
151
+ # url: jdbc:mysql://localhost:3306/mydb
152
+ # user: root
153
+ # password:
154
+
155
+ # ============================================
156
+
157
+ # ============================================
158
+ # HSQL-DB
159
+ # driver: org.hsqldb.jdbcDriver
160
+ # url: jdbc:hsqldb:hsql://localhost:9001/mydb
161
+ # schema: PUBLIC
162
+
163
+ # ============================================
164
+ # SQLSERVER (the JDBC Driver is in "sqljdbc.jar" )
165
+ # driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
166
+ # url = "jdbc:sqlserver://10.226.xxx.xxx"
167
+ # user: demo
168
+ # password: demo
169
+ # catalog: demo
170
+ # schema: dbo
171
+
172
+ # ============================================
173
+ # ORACLE
174
+ # JDBC Driver jar files :
175
+ # See https://www.oracle.com/fr/database/technologies/appdev/jdbc-downloads.html
176
+ # for Oracle versions 21c, 19c, 18c, and 12.2 :
177
+ # . ojdbc11.jar ( JDBC 4.3 / JDK11 and JDK17 )
178
+ # . ojdbc10.jar ( JDBC 4.3 / JDK11 )
179
+ # . ojdbc8.jar ( JDBC 4.2 / JDK8 and JDK11 )
180
+ # other old jars examples: ojdbc14.jar, ojdbc6.jar (JDK 1.6), ojdbc5.jar (JDK 1.5)
181
+ # schema: "HR" to use the demo database provided with Oracle XE
182
+ #----------------
183
+ # driver: oracle.jdbc.driver.OracleDriver
184
+ # url for SID: jdbc:oracle:thin:@[HOST][:PORT]:SID (older format)
185
+ # url for SERVICE: jdbc:oracle:thin:@[HOST][:PORT]/SERVICE (newer format)
186
+ # url example for XE: jdbc:oracle:thin:@localhost:1521/XE
187
+ # catalog: '!'
188
+ # schema: HR
@@ -0,0 +1,26 @@
1
+ // ----------------------------------------------------------------------------
2
+ // Outbound infrastructure: Database
3
+ @DbSchema("FAM_API")
4
+ @DbTable("FAM_ACTIVITAT")
5
+ #DbColumnPrefix("FAM_ACT")
6
+ // ----------------------------------------------------------------------------
7
+ // Inbound infrastructure: API Rest
8
+ #ApiResource("activitats")
9
+ // ----------------------------------------------------------------------------
10
+ // Domain Model
11
+ @AggregateRoot
12
+ #AggregateDeletion("logical")
13
+ // ----------------------------------------------------------------------------
14
+ // Tabs in Detail Page
15
+ #DetailTabs("FamActivitatsUbicacio")
16
+ // Model definition
17
+ FamActivitat {
18
+ famActId : long {
19
+ @Id @NotNull @MaxLen(10) @DbName("ID") #postable(false) #updatable(false)
20
+ };
21
+ famActDescripcio : string {
22
+ @MaxLen(64) @DbName("DESCRIPCIO")
23
+ #mandatoryInList(true)
24
+ };
25
+ famActivitatsUbicacions : FamActivitatsUbicacio[] { @MappedBy(famActivitat) };
26
+ }