You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

206 lines
7.0 KiB

  1. import { FormGroup, FormControl, Validators } from '@angular/forms';
  2. export const locationForm = new FormGroup({
  3. dbId: new FormControl(null, []),
  4. zone: new FormControl(null, []),
  5. name: new FormControl(null, [Validators.required]),
  6. code: new FormControl(null, [Validators.required]),
  7. createdAt: new FormControl(null, [])
  8. });
  9. export const locationJsonldForm = new FormGroup({
  10. dbId: new FormControl(null, []),
  11. zone: new FormControl(null, []),
  12. name: new FormControl(null, [Validators.required]),
  13. code: new FormControl(null, [Validators.required]),
  14. createdAt: new FormControl(null, [])
  15. });
  16. export const mediaObjectJsonldForm = new FormGroup({
  17. id: new FormControl(null, []),
  18. contentUrl: new FormControl(null, []),
  19. file: new FormControl(null, [Validators.required]),
  20. filePath: new FormControl(null, []),
  21. createdBy: new FormControl(null, []),
  22. createdAt: new FormControl(null, [])
  23. });
  24. export const shippingCompanyForm = new FormGroup({
  25. dbId: new FormControl(null, []),
  26. name: new FormControl(null, [Validators.required]),
  27. code: new FormControl(null, [Validators.required]),
  28. createdAt: new FormControl(null, [])
  29. });
  30. export const shippingCompanyJsonldForm = new FormGroup({
  31. dbId: new FormControl(null, []),
  32. name: new FormControl(null, [Validators.required]),
  33. code: new FormControl(null, [Validators.required]),
  34. createdAt: new FormControl(null, [])
  35. });
  36. export const tripForm = new FormGroup({
  37. dbId: new FormControl(null, []),
  38. vessel: new FormControl(null, []),
  39. pilotReference: new FormControl(null, [Validators.required]),
  40. captainName: new FormControl(null, []),
  41. startLocation: new FormControl(null, []),
  42. endLocation: new FormControl(null, []),
  43. startDate: new FormControl(null, [Validators.required]),
  44. endDate: new FormControl(null, [Validators.required]),
  45. createdAt: new FormControl(null, [])
  46. });
  47. export const tripJsonldForm = new FormGroup({
  48. dbId: new FormControl(null, []),
  49. vessel: new FormControl(null, []),
  50. pilotReference: new FormControl(null, [Validators.required]),
  51. captainName: new FormControl(null, []),
  52. startLocation: new FormControl(null, []),
  53. endLocation: new FormControl(null, []),
  54. startDate: new FormControl(null, [Validators.required]),
  55. endDate: new FormControl(null, [Validators.required]),
  56. createdAt: new FormControl(null, [])
  57. });
  58. export const tripLocationForm = new FormGroup({
  59. dbId: new FormControl(null, []),
  60. trip: new FormControl(null, []),
  61. location: new FormControl(null, []),
  62. date: new FormControl(null, [Validators.required]),
  63. createdAt: new FormControl(null, [])
  64. });
  65. export const tripLocationJsonldForm = new FormGroup({
  66. dbId: new FormControl(null, []),
  67. trip: new FormControl(null, []),
  68. location: new FormControl(null, []),
  69. date: new FormControl(null, [Validators.required]),
  70. createdAt: new FormControl(null, [])
  71. });
  72. export const userForm = new FormGroup({
  73. dbId: new FormControl(null, []),
  74. email: new FormControl(null, [Validators.required, Validators.email]),
  75. firstName: new FormControl(null, [Validators.required]),
  76. lastName: new FormControl(null, [Validators.required]),
  77. image: new FormControl(null, []),
  78. imageUrl: new FormControl(null, []),
  79. fullName: new FormControl(null, []),
  80. password: new FormControl(null, []),
  81. active: new FormControl(null, []),
  82. createdAt: new FormControl(null, [])
  83. });
  84. export const userJsonldForm = new FormGroup({
  85. dbId: new FormControl(null, []),
  86. email: new FormControl(null, [Validators.required, Validators.email]),
  87. firstName: new FormControl(null, [Validators.required]),
  88. lastName: new FormControl(null, [Validators.required]),
  89. image: new FormControl(null, []),
  90. imageUrl: new FormControl(null, []),
  91. fullName: new FormControl(null, []),
  92. password: new FormControl(null, []),
  93. active: new FormControl(null, []),
  94. createdAt: new FormControl(null, [])
  95. });
  96. export const userTripForm = new FormGroup({
  97. dbId: new FormControl(null, []),
  98. trip: new FormControl(null, []),
  99. user: new FormControl(null, []),
  100. captainName: new FormControl(null, [Validators.required]),
  101. startDate: new FormControl(null, [Validators.required]),
  102. endDate: new FormControl(null, [Validators.required]),
  103. createdAt: new FormControl(null, [])
  104. });
  105. export const userTripJsonldForm = new FormGroup({
  106. dbId: new FormControl(null, []),
  107. trip: new FormControl(null, []),
  108. user: new FormControl(null, []),
  109. captainName: new FormControl(null, [Validators.required]),
  110. startDate: new FormControl(null, [Validators.required]),
  111. endDate: new FormControl(null, [Validators.required]),
  112. createdAt: new FormControl(null, [])
  113. });
  114. export const userTripLocationForm = new FormGroup({
  115. dbId: new FormControl(null, []),
  116. userTrip: new FormControl(null, []),
  117. location: new FormControl(null, []),
  118. plannedDate: new FormControl(null, [Validators.required]),
  119. createdAt: new FormControl(null, [])
  120. });
  121. export const userTripLocationJsonldForm = new FormGroup({
  122. dbId: new FormControl(null, []),
  123. userTrip: new FormControl(null, []),
  124. location: new FormControl(null, []),
  125. plannedDate: new FormControl(null, [Validators.required]),
  126. createdAt: new FormControl(null, [])
  127. });
  128. export const userTripWorkLogForm = new FormGroup({
  129. dbId: new FormControl(null, []),
  130. userTrip: new FormControl(null, []),
  131. startLocation: new FormControl(null, []),
  132. endLocation: new FormControl(null, []),
  133. startDate: new FormControl(null, [Validators.required]),
  134. endDate: new FormControl(null, [Validators.required]),
  135. createdAt: new FormControl(null, [])
  136. });
  137. export const userTripWorkLogJsonldForm = new FormGroup({
  138. dbId: new FormControl(null, []),
  139. userTrip: new FormControl(null, []),
  140. startLocation: new FormControl(null, []),
  141. endLocation: new FormControl(null, []),
  142. startDate: new FormControl(null, [Validators.required]),
  143. endDate: new FormControl(null, [Validators.required]),
  144. createdAt: new FormControl(null, [])
  145. });
  146. export const vesselForm = new FormGroup({
  147. dbId: new FormControl(null, []),
  148. name: new FormControl(null, [Validators.required]),
  149. code: new FormControl(null, [Validators.required]),
  150. company: new FormControl(null, []),
  151. createdAt: new FormControl(null, [])
  152. });
  153. export const vesselJsonldForm = new FormGroup({
  154. dbId: new FormControl(null, []),
  155. name: new FormControl(null, [Validators.required]),
  156. code: new FormControl(null, [Validators.required]),
  157. company: new FormControl(null, []),
  158. createdAt: new FormControl(null, [])
  159. });
  160. export const zoneForm = new FormGroup({
  161. dbId: new FormControl(null, []),
  162. name: new FormControl(null, [Validators.required]),
  163. createdAt: new FormControl(null, [])
  164. });
  165. export const zoneJsonldForm = new FormGroup({
  166. dbId: new FormControl(null, []),
  167. name: new FormControl(null, [Validators.required]),
  168. createdAt: new FormControl(null, [])
  169. });
  170. export const credentialsForm = new FormGroup({
  171. email: new FormControl(null, []),
  172. password: new FormControl(null, [])
  173. });
  174. export const authResponseForm = new FormGroup({
  175. token: new FormControl(null, []),
  176. id: new FormControl(null, []),
  177. email: new FormControl(null, []),
  178. firstName: new FormControl(null, []),
  179. lastName: new FormControl(null, []),
  180. roles: new FormControl(null, []),
  181. user: new FormControl(null, [])
  182. });