admin.routing.ts 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. import { Routes } from "@angular/router";
  2. import { DashboardComponent } from "../../components/dashboard/dashboard.component";
  3. import { ProfileComponent } from "../../components/profile/profile.component";
  4. import { AuthGuard } from "@app/services/auth.guard";
  5. import { InvestmentsComponent } from "@app/components/investments/investments.component";
  6. import { InvestmentProposalsComponent } from "@app/components/investment-proposals/investment-proposals.component";
  7. import { InvestmentProposalGeneralInfoComponent } from "@app/components/investment-proposals/general-info/general-info.component";
  8. import { ArbitrationsComponent } from "@app/components/arbitrations/arbitrations.component";
  9. import { PerformancesComponent } from "@app/components/performances/performances.component";
  10. import { InstrumentWorkComponent } from "@app/components/investment-proposals/instrument-work/instrument-work.component";
  11. import { ComplementInfoComponent } from "@app/components/investment-proposals/complement-info/complement-info.component";
  12. import { ResultComponent } from "@app/components/investment-proposals/result/result.component";
  13. import { WorkflowGuard } from "@app/services/investment-proposal-workflow.guard";
  14. import { InvestmentProposalReviewComponent } from "@app/components/investment-proposals/review/review.component";
  15. import { ChangeHistoryComponent } from "@app/components/investment-proposals/change-history/change-history.component";
  16. import { PaymentInfoComponent } from "@app/components/investment-proposals/payment-info/payment-info.component";
  17. import { PaymentRequirementComponent } from "@app/components/investment-proposals/payment-requirement/payment-requirement.component";
  18. import { InvestmentProposalDetailComponent } from "@app/components/investment-proposals/proposal-detail/proposal-detail.component";
  19. import { NgModule } from "@angular/core";
  20. import { from } from "rxjs";
  21. import { InvestmentProposalApproveComponent } from "@app/components/investment-proposals/approve/approve.component";
  22. import { DAPCostsComponent } from "@app/components/investments/costs/dap/dap.costs.component";
  23. import { VCNCostsComponent } from "@app/components/investments/costs/vcn/vcn.costs.component";
  24. import { PBURCostsComponent } from "@app/components/investments/costs/pbur/pbur.costs.component";
  25. import { IncomesComponent } from "@app/components/incomes/incomes.component";
  26. import { GeneralIncomeFormComponent } from "@app/components/incomes/general-form/general-form.component";
  27. export const AdminLayoutRoutes: Routes = [
  28. {
  29. path: "dashboard",
  30. component: DashboardComponent,
  31. data: { title: "Dashboard" }
  32. },
  33. {
  34. path: "profile",
  35. component: ProfileComponent,
  36. data: { title: "Perfil de usuario" }
  37. },
  38. {
  39. path: "investments",
  40. component: InvestmentsComponent,
  41. //canActivate: [AuthGuard],
  42. data: {
  43. title: "Inversiones",
  44. breadcrumb: "Inversiones",
  45. roles: [2, 3]
  46. }
  47. },
  48. {
  49. path: "arbitrations",
  50. component: ArbitrationsComponent,
  51. //canActivate: [AuthGuard],
  52. data: {
  53. title: "Arbitrajes",
  54. breadcrumb: "Arbitrajes",
  55. roles: [2, 3]
  56. }
  57. },
  58. {
  59. path: "performances",
  60. component: PerformancesComponent,
  61. //canActivate: [AuthGuard],
  62. data: {
  63. title: "Rendimientos",
  64. breadcrumb: "Rendimientos",
  65. roles: [2, 3]
  66. }
  67. },
  68. /*
  69. {
  70. path: "users",
  71. component: UsersComponent,
  72. //canActivate: [AuthGuard],
  73. data: {
  74. title: "Listado de usuarios",
  75. breadcrumb: "Usuarios",
  76. roles: [3]
  77. }
  78. },
  79. {
  80. path: "companies",
  81. component: CompaniesComponent,
  82. //canActivate: [AuthGuard],
  83. data: {
  84. title: "Empresas",
  85. breadcrumb: "Empresas",
  86. roles: [3]
  87. }
  88. },
  89. {
  90. path: "companies/new",
  91. component: NewCompanyComponent,
  92. //canActivate: [AuthGuard],
  93. data: {
  94. title: "Nueva empresa",
  95. breadcrumb: "Nueva empresa",
  96. roles: [3]
  97. }
  98. },*/
  99. {
  100. path: "investment-proposals",
  101. component: InvestmentProposalsComponent,
  102. //canActivate: [AuthGuard],
  103. data: {
  104. title: "Propuestas de inversión",
  105. breadcrumb: "Propuestas de inversión",
  106. roles: [2, 3]
  107. }
  108. },
  109. {
  110. path: "investment-proposal",
  111. children: [
  112. {
  113. path: "general-info",
  114. component: InvestmentProposalGeneralInfoComponent,
  115. //canActivate: [AuthGuard],
  116. data: {
  117. title: "Nueva propuestas de inversión",
  118. breadcrumb: "Nueva propuestas de inversión",
  119. roles: [2, 3]
  120. }
  121. },
  122. {
  123. path: ":id/general-info",
  124. component: InvestmentProposalGeneralInfoComponent,
  125. //canActivate: [AuthGuard],
  126. data: {
  127. title: "Propuestas de inversión",
  128. breadcrumb: "Propuestas de inversión",
  129. roles: [2, 3]
  130. }
  131. }
  132. ]
  133. },
  134. {
  135. path: "investment-proposal/instrument-work",
  136. component: InstrumentWorkComponent,
  137. canActivate: [WorkflowGuard]
  138. },
  139. {
  140. path: "investment-proposal/:id/instrument-work",
  141. component: InstrumentWorkComponent,
  142. canActivate: [WorkflowGuard]
  143. },
  144. {
  145. path: "investment-proposal/complement-info",
  146. component: ComplementInfoComponent,
  147. canActivate: [WorkflowGuard]
  148. },
  149. {
  150. path: "investment-proposal/:id/complement-info",
  151. component: ComplementInfoComponent,
  152. canActivate: [WorkflowGuard]
  153. },
  154. {
  155. path: "investment-proposal/result",
  156. component: ResultComponent,
  157. canActivate: [WorkflowGuard]
  158. },
  159. {
  160. path: "investment-proposal/:id/result",
  161. component: ResultComponent,
  162. canActivate: [WorkflowGuard]
  163. },
  164. {
  165. path: "investment-proposal/:id/review",
  166. component: InvestmentProposalReviewComponent
  167. },
  168. {
  169. path: "investment-proposal/:id/approve",
  170. component: InvestmentProposalApproveComponent
  171. },
  172. {
  173. path: "investment-proposal/:id/change-history",
  174. component: ChangeHistoryComponent
  175. },
  176. {
  177. path: "investment-proposal/:id/payment-info",
  178. component: PaymentInfoComponent
  179. },
  180. {
  181. path: "investment-proposal/:id/payment",
  182. component: PaymentRequirementComponent
  183. },
  184. {
  185. path: "investment-proposal/:id",
  186. component: InvestmentProposalDetailComponent
  187. },
  188. {
  189. path: "investment-costs/dap/:id",
  190. component: DAPCostsComponent
  191. },
  192. {
  193. path: "investment-costs/vcn/:id",
  194. component: VCNCostsComponent
  195. },
  196. {
  197. path: "investment-costs/pbur/:id",
  198. component: PBURCostsComponent
  199. },
  200. {
  201. path: "investment-incomes",
  202. component: IncomesComponent
  203. },
  204. {
  205. path: "investment-income/:instrument/:id",
  206. component: GeneralIncomeFormComponent
  207. } /*
  208. {
  209. path: "investment-income/vcn/:id",
  210. component: VCNIncomeComponent
  211. },
  212. {
  213. path: "investment-income/pbur/:id",
  214. component: PBURIncomeComponent
  215. },
  216. {
  217. path: "investment-income/cete/:id",
  218. component: CETEIncomeComponent
  219. },
  220. */
  221. ];