taxtank-core 0.30.143 → 0.31.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 (305) hide show
  1. package/esm2020/lib/collections/collection.mjs +2 -2
  2. package/esm2020/lib/db/Models/depreciation/depreciation.mjs +1 -1
  3. package/esm2020/lib/db/Models/document/document-folder.mjs +1 -1
  4. package/esm2020/lib/db/Models/document/document.mjs +1 -1
  5. package/esm2020/lib/db/Models/document/property-document.mjs +1 -7
  6. package/esm2020/lib/db/Models/firm/firm.mjs +1 -1
  7. package/esm2020/lib/db/Models/index.mjs +1 -3
  8. package/esm2020/lib/db/Models/property/property-valuation.mjs +3 -8
  9. package/esm2020/lib/db/Models/property/property.mjs +1 -1
  10. package/esm2020/lib/db/Models/sole/sole-business.mjs +1 -1
  11. package/esm2020/lib/db/Models/transaction/transaction-base.mjs +10 -7
  12. package/esm2020/lib/db/Models/transaction/transaction.mjs +1 -1
  13. package/esm2020/lib/db/Models/user/user.mjs +1 -1
  14. package/esm2020/lib/forms/document-folder/document-folder.form.mjs +11 -0
  15. package/esm2020/lib/forms/document-folder/document.form.mjs +11 -0
  16. package/esm2020/lib/forms/document-folder/index.mjs +3 -0
  17. package/esm2020/lib/forms/firm/firm.form.mjs +17 -0
  18. package/esm2020/lib/forms/firm/index.mjs +2 -0
  19. package/esm2020/lib/forms/index.mjs +3 -1
  20. package/esm2020/lib/forms/property/index.mjs +5 -2
  21. package/esm2020/lib/forms/property/property-document.form.mjs +14 -0
  22. package/esm2020/lib/forms/property/property-edit.form.mjs +17 -0
  23. package/esm2020/lib/forms/property/property-valuation.form.mjs +17 -0
  24. package/esm2020/lib/forms/sole/sole-business.form.mjs +4 -3
  25. package/esm2020/lib/forms/transaction/transaction-base.form.mjs +4 -7
  26. package/esm2020/lib/forms/user/client-details.form.mjs +34 -0
  27. package/esm2020/lib/forms/user/index.mjs +3 -1
  28. package/esm2020/lib/forms/user/user.form.mjs +15 -0
  29. package/esm2020/lib/functions/get-doc-icon.mjs +3 -3
  30. package/esm2020/lib/interceptors/basiq-client-id.interceptor.mjs +3 -3
  31. package/esm2020/lib/interceptors/basiq-token.interceptor.mjs +3 -3
  32. package/esm2020/lib/interceptors/corelogic-interceptor.mjs +3 -3
  33. package/esm2020/lib/interceptors/financial-year-interceptor.mjs +3 -3
  34. package/esm2020/lib/interceptors/interceptors.module.mjs +4 -4
  35. package/esm2020/lib/interceptors/jwt-interceptor.mjs +3 -3
  36. package/esm2020/lib/interceptors/preloader.interceptor.mjs +3 -3
  37. package/esm2020/lib/interceptors/user-switcher-interceptor.mjs +3 -3
  38. package/esm2020/lib/interfaces/asset-type.enum.mjs +1 -3
  39. package/esm2020/lib/interfaces/document.interface.mjs +1 -1
  40. package/esm2020/lib/interfaces/documentable.interface.mjs +1 -1
  41. package/esm2020/lib/interfaces/fileable.interface.mjs +2 -0
  42. package/esm2020/lib/interfaces/index.mjs +2 -3
  43. package/esm2020/lib/models/bank/bank.mjs +5 -10
  44. package/esm2020/lib/models/chat/message-document.mjs +4 -3
  45. package/esm2020/lib/models/depreciation/depreciation.mjs +1 -1
  46. package/esm2020/lib/models/depreciation/index.mjs +1 -2
  47. package/esm2020/lib/models/document/document-folder.mjs +1 -7
  48. package/esm2020/lib/models/document/document.mjs +12 -19
  49. package/esm2020/lib/models/endpoint/endpoints.const.mjs +7 -8
  50. package/esm2020/lib/models/event/app-event-type.enum.mjs +45 -53
  51. package/esm2020/lib/models/file/file.mjs +5 -1
  52. package/esm2020/lib/models/firm/firm.mjs +5 -13
  53. package/esm2020/lib/models/property/property-document.mjs +12 -12
  54. package/esm2020/lib/models/property/property-valuation.mjs +2 -5
  55. package/esm2020/lib/models/property/property.mjs +5 -13
  56. package/esm2020/lib/models/registration-invite/registration-invite.mjs +7 -7
  57. package/esm2020/lib/models/sole/sole-business.mjs +6 -8
  58. package/esm2020/lib/models/sole/sole-contact.mjs +5 -8
  59. package/esm2020/lib/models/sole/sole-invoice-template.mjs +1 -1
  60. package/esm2020/lib/models/transaction/index.mjs +1 -2
  61. package/esm2020/lib/models/transaction/transaction.mjs +1 -5
  62. package/esm2020/lib/models/user/user.mjs +6 -14
  63. package/esm2020/lib/services/account-setup/account-setup.service.mjs +3 -3
  64. package/esm2020/lib/services/affiliate/rewardful/rewardful.service.mjs +3 -3
  65. package/esm2020/lib/services/asset/assets.service.mjs +3 -3
  66. package/esm2020/lib/services/auth/auth.service.mjs +3 -3
  67. package/esm2020/lib/services/auth/jwt.service.mjs +3 -3
  68. package/esm2020/lib/services/bank/bank-account-calculation.service.mjs +3 -3
  69. package/esm2020/lib/services/bank/bank-transaction-calculation.service.mjs +3 -3
  70. package/esm2020/lib/services/data.service.mjs +3 -3
  71. package/esm2020/lib/services/event/event-dispatcher.service.mjs +3 -3
  72. package/esm2020/lib/services/event/sse.service.mjs +3 -3
  73. package/esm2020/lib/services/export/export-formatter.service.mjs +3 -3
  74. package/esm2020/lib/services/header-title/header-title.service.mjs +3 -3
  75. package/esm2020/lib/services/http/address/address.service.mjs +3 -3
  76. package/esm2020/lib/services/http/bank/bank-account/bank-account.service.mjs +3 -3
  77. package/esm2020/lib/services/http/bank/bank-connection/bank-connection.service.mjs +3 -3
  78. package/esm2020/lib/services/http/bank/bank-transaction/bank-transaction.service.mjs +3 -3
  79. package/esm2020/lib/services/http/bank/bank.service.mjs +3 -3
  80. package/esm2020/lib/services/http/bank/basiq/basiq-token.service.mjs +3 -3
  81. package/esm2020/lib/services/http/bank/basiq/basiq.service.mjs +3 -3
  82. package/esm2020/lib/services/http/budget/budget.service.mjs +3 -3
  83. package/esm2020/lib/services/http/chart-accounts/chart-accounts-depreciations/chart-accounts-depreciations.service.mjs +3 -3
  84. package/esm2020/lib/services/http/chart-accounts/chart-accounts.service.mjs +3 -3
  85. package/esm2020/lib/services/http/chat/chat.service.mjs +3 -3
  86. package/esm2020/lib/services/http/chat/message-document.service.mjs +5 -5
  87. package/esm2020/lib/services/http/chat/message.service.mjs +3 -3
  88. package/esm2020/lib/services/http/client/capital-gain/annual-client-details.service.mjs +3 -3
  89. package/esm2020/lib/services/http/client/occupation/occupation.service.mjs +3 -3
  90. package/esm2020/lib/services/http/depreciation/depreciation-capital-project/depreciation-capital-project.service.mjs +3 -3
  91. package/esm2020/lib/services/http/depreciation/depreciation.service.mjs +7 -55
  92. package/esm2020/lib/services/http/depreciation/index.mjs +1 -2
  93. package/esm2020/lib/services/http/document/document-folder/document-folder-messages.enum.mjs +8 -0
  94. package/esm2020/lib/services/http/document/document-folder/document-folder.service.mjs +9 -59
  95. package/esm2020/lib/services/http/document/document-folder/index.mjs +3 -0
  96. package/esm2020/lib/services/http/document/document-messages.enum.mjs +8 -0
  97. package/esm2020/lib/services/http/document/document.service.mjs +10 -6
  98. package/esm2020/lib/services/http/document/index.mjs +3 -2
  99. package/esm2020/lib/services/http/facebook/facebook.service.mjs +3 -3
  100. package/esm2020/lib/services/http/file/file.service.mjs +10 -4
  101. package/esm2020/lib/services/http/firm/client-income/client-income-types.service.mjs +3 -3
  102. package/esm2020/lib/services/http/firm/client-invite/client-invite.service.mjs +3 -3
  103. package/esm2020/lib/services/http/firm/client-movement/client-movement.service.mjs +3 -3
  104. package/esm2020/lib/services/http/firm/employee/employee.service.mjs +3 -3
  105. package/esm2020/lib/services/http/firm/employee-invite/employee-invite.service.mjs +3 -3
  106. package/esm2020/lib/services/http/firm/firm-messages.enum.mjs +6 -0
  107. package/esm2020/lib/services/http/firm/firm.service.mjs +4 -12
  108. package/esm2020/lib/services/http/firm/index.mjs +2 -1
  109. package/esm2020/lib/services/http/firm/portfolio-report/client-portfolio-report.service.mjs +3 -3
  110. package/esm2020/lib/services/http/google/google.service.mjs +3 -3
  111. package/esm2020/lib/services/http/holding/holding-sale.service.mjs +3 -3
  112. package/esm2020/lib/services/http/holding/holding-type.service.mjs +3 -3
  113. package/esm2020/lib/services/http/holding/holding.service.mjs +3 -3
  114. package/esm2020/lib/services/http/income-source/income-source-forecast/income-source-forecast.service.mjs +3 -3
  115. package/esm2020/lib/services/http/income-source/income-source.service.mjs +3 -3
  116. package/esm2020/lib/services/http/income-source/salary-forecast/salary-forecast.service.mjs +3 -3
  117. package/esm2020/lib/services/http/income-source/sole-forecast/sole-forecast.service.mjs +3 -3
  118. package/esm2020/lib/services/http/index.mjs +1 -2
  119. package/esm2020/lib/services/http/loan/borrowing-expense/borrowing-expense.service.mjs +3 -3
  120. package/esm2020/lib/services/http/loan/loan.service.mjs +3 -3
  121. package/esm2020/lib/services/http/property/borrowing-report/borrowing-report.service.mjs +3 -3
  122. package/esm2020/lib/services/http/property/index.mjs +3 -1
  123. package/esm2020/lib/services/http/property/property-category/property-category.service.mjs +3 -3
  124. package/esm2020/lib/services/http/property/property-category-movement/property-category-movement.service.mjs +3 -3
  125. package/esm2020/lib/services/http/property/property-document/index.mjs +2 -1
  126. package/esm2020/lib/services/http/property/property-document/property-document-messages.enum.mjs +8 -0
  127. package/esm2020/lib/services/http/property/property-document/property-document.service.mjs +7 -6
  128. package/esm2020/lib/services/http/property/property-messages.enum.mjs +6 -0
  129. package/esm2020/lib/services/http/property/property-sale/property-sale.service.mjs +3 -3
  130. package/esm2020/lib/services/http/property/property-share/property-share.service.mjs +3 -3
  131. package/esm2020/lib/services/http/property/property-valuation/index.mjs +3 -0
  132. package/esm2020/lib/services/http/property/property-valuation/property-valuation-messages.enum.mjs +6 -0
  133. package/esm2020/lib/services/http/property/property-valuation/property-valuation.service.mjs +39 -0
  134. package/esm2020/lib/services/http/property/property.service.mjs +9 -5
  135. package/esm2020/lib/services/http/rest/rest-old.service.mjs +3 -3
  136. package/esm2020/lib/services/http/rest/rest.service.mjs +9 -9
  137. package/esm2020/lib/services/http/service-notification/service-notification.service.mjs +3 -3
  138. package/esm2020/lib/services/http/sole/bas-report/bas-report.service.mjs +3 -3
  139. package/esm2020/lib/services/http/sole/index.mjs +2 -2
  140. package/esm2020/lib/services/http/sole/sole-business/index.mjs +3 -0
  141. package/esm2020/lib/services/http/sole/sole-business/sole-business-messages.enum.mjs +5 -0
  142. package/esm2020/lib/services/http/sole/sole-business/sole-business.service.mjs +5 -28
  143. package/esm2020/lib/services/http/sole/sole-business-activity/sole-business-activity.service.mjs +3 -3
  144. package/esm2020/lib/services/http/sole/sole-business-loss/sole-business-loss-rules/sole-business-loss-offset-rule.service.mjs +3 -3
  145. package/esm2020/lib/services/http/sole/sole-business-loss/sole-business-loss.service.mjs +3 -3
  146. package/esm2020/lib/services/http/sole/sole-contact/sole-contact.service.mjs +3 -3
  147. package/esm2020/lib/services/http/sole/sole-depreciation-method/sole-depreciation-method.service.mjs +3 -3
  148. package/esm2020/lib/services/http/sole/sole-details/sole-details.service.mjs +3 -3
  149. package/esm2020/lib/services/http/sole/sole-invoice/sole-invoice.service.mjs +3 -3
  150. package/esm2020/lib/services/http/sole/sole-invoice-template/sole-invoice-template.service.mjs +3 -3
  151. package/esm2020/lib/services/http/subscription/service-payment/service-payment.service.mjs +3 -3
  152. package/esm2020/lib/services/http/subscription/service-payment-method/service-payment-method.service.mjs +3 -3
  153. package/esm2020/lib/services/http/subscription/service-price/service-price.service.mjs +3 -3
  154. package/esm2020/lib/services/http/subscription/service-product/service-product.service.mjs +3 -3
  155. package/esm2020/lib/services/http/subscription/service-subscription/subscription.service.mjs +3 -3
  156. package/esm2020/lib/services/http/tax-review/tax-review-history/tax-review-history.service.mjs +3 -3
  157. package/esm2020/lib/services/http/tax-review/tax-review.service.mjs +3 -3
  158. package/esm2020/lib/services/http/tax-summary/tax-summary.service.mjs +3 -3
  159. package/esm2020/lib/services/http/transaction/index.mjs +1 -2
  160. package/esm2020/lib/services/http/transaction/transaction-allocation/allocation-rule/allocation-rule.service.mjs +3 -3
  161. package/esm2020/lib/services/http/transaction/transaction-allocation/transaction-allocation.service.mjs +3 -3
  162. package/esm2020/lib/services/http/transaction/transaction.service.mjs +6 -43
  163. package/esm2020/lib/services/http/tutorial-video/tutorial-video.service.mjs +3 -3
  164. package/esm2020/lib/services/http/user/financial-year/financial-year.service.mjs +3 -3
  165. package/esm2020/lib/services/http/user/index.mjs +2 -1
  166. package/esm2020/lib/services/http/user/user-event-setting/user-event-setting.service.mjs +3 -3
  167. package/esm2020/lib/services/http/user/user-event-type/user-event-type.service.mjs +3 -3
  168. package/esm2020/lib/services/http/user/user-messages.enum.mjs +7 -0
  169. package/esm2020/lib/services/http/user/user.service.mjs +3 -3
  170. package/esm2020/lib/services/http/user/users-invite/users-invite.service.mjs +3 -3
  171. package/esm2020/lib/services/http/vehicle/vehicle-claim-details.service.mjs +3 -3
  172. package/esm2020/lib/services/http/vehicle/vehicle-claim.service.mjs +3 -3
  173. package/esm2020/lib/services/http/vehicle/vehicle-logbook.service.mjs +3 -3
  174. package/esm2020/lib/services/http/vehicle/vehicle.service.mjs +3 -3
  175. package/esm2020/lib/services/intercom/intercom.service.mjs +3 -3
  176. package/esm2020/lib/services/json/chart-accounts/chart-accounts-value.service.mjs +3 -3
  177. package/esm2020/lib/services/json/holding/holding-type-exchange.service.mjs +3 -3
  178. package/esm2020/lib/services/json/income-source/income-source-type.service.mjs +3 -3
  179. package/esm2020/lib/services/json/tax-exemption/tax-exemption.service.mjs +3 -3
  180. package/esm2020/lib/services/json/tax-return/tax-return-item.service.mjs +3 -3
  181. package/esm2020/lib/services/pdf/pdf-from-dom-element/pdf-from-dom-element.service.mjs +3 -3
  182. package/esm2020/lib/services/pdf/pdf-from-table/pdf-from-data-table/pdf-from-data-table.service.mjs +3 -3
  183. package/esm2020/lib/services/pdf/pdf-from-table/pdf-from-html-table/pdf-from-html-table.service.mjs +3 -3
  184. package/esm2020/lib/services/pdf/pdf-from-table/pdf-from-table.service.mjs +3 -3
  185. package/esm2020/lib/services/preloader/preloader.service.mjs +3 -3
  186. package/esm2020/lib/services/property/corelogic/corelogic.service.mjs +3 -3
  187. package/esm2020/lib/services/property/equity-position-chart/equity-position-chart.service.mjs +3 -3
  188. package/esm2020/lib/services/property/property-calculation/property-calculation.service.mjs +3 -3
  189. package/esm2020/lib/services/report/property/property-transaction-report.service.mjs +3 -3
  190. package/esm2020/lib/services/toast/toast.service.mjs +3 -3
  191. package/esm2020/lib/services/transaction/transaction-calculation.service.mjs +3 -3
  192. package/esm2020/lib/services/user/user-switcher.service.mjs +3 -3
  193. package/esm2020/lib/services/vehicle/logbook-best-period.service.mjs +3 -3
  194. package/esm2020/lib/services/xlsx/xlsx.service.mjs +3 -3
  195. package/esm2020/lib/tt-core.module.mjs +4 -4
  196. package/esm2020/public-api.mjs +2 -18
  197. package/fesm2015/taxtank-core.mjs +1124 -1306
  198. package/fesm2015/taxtank-core.mjs.map +1 -1
  199. package/fesm2020/taxtank-core.mjs +1111 -1289
  200. package/fesm2020/taxtank-core.mjs.map +1 -1
  201. package/lib/db/Models/depreciation/depreciation.d.ts +0 -2
  202. package/lib/db/Models/document/document-folder.d.ts +1 -2
  203. package/lib/db/Models/document/property-document.d.ts +6 -5
  204. package/lib/db/Models/firm/firm.d.ts +2 -0
  205. package/lib/db/Models/index.d.ts +0 -2
  206. package/lib/db/Models/property/property-valuation.d.ts +2 -2
  207. package/lib/db/Models/property/property.d.ts +2 -0
  208. package/lib/db/Models/sole/sole-business.d.ts +2 -0
  209. package/lib/db/Models/transaction/transaction-base.d.ts +5 -7
  210. package/lib/db/Models/transaction/transaction.d.ts +0 -2
  211. package/lib/db/Models/user/user.d.ts +2 -1
  212. package/lib/forms/document-folder/document-folder.form.d.ts +5 -0
  213. package/lib/forms/document-folder/document.form.d.ts +5 -0
  214. package/lib/forms/document-folder/index.d.ts +2 -0
  215. package/lib/forms/firm/firm.form.d.ts +5 -0
  216. package/lib/forms/firm/index.d.ts +1 -0
  217. package/lib/forms/index.d.ts +2 -0
  218. package/lib/forms/property/index.d.ts +4 -1
  219. package/lib/forms/property/property-document.form.d.ts +6 -0
  220. package/lib/forms/property/property-edit.form.d.ts +5 -0
  221. package/lib/forms/property/property-valuation.form.d.ts +6 -0
  222. package/lib/forms/user/client-details.form.d.ts +7 -0
  223. package/lib/forms/user/index.d.ts +2 -0
  224. package/lib/forms/user/user.form.d.ts +5 -0
  225. package/lib/functions/get-doc-icon.d.ts +2 -2
  226. package/lib/interfaces/asset-type.enum.d.ts +0 -2
  227. package/lib/interfaces/document.interface.d.ts +4 -14
  228. package/lib/interfaces/documentable.interface.d.ts +2 -2
  229. package/lib/interfaces/fileable.interface.d.ts +8 -0
  230. package/lib/interfaces/index.d.ts +1 -2
  231. package/lib/models/bank/bank.d.ts +4 -4
  232. package/lib/models/chat/message-document.d.ts +2 -1
  233. package/lib/models/depreciation/depreciation.d.ts +2 -4
  234. package/lib/models/depreciation/index.d.ts +0 -1
  235. package/lib/models/document/document-folder.d.ts +1 -5
  236. package/lib/models/document/document.d.ts +5 -17
  237. package/lib/models/event/app-event-type.enum.d.ts +44 -52
  238. package/lib/models/file/file.d.ts +2 -0
  239. package/lib/models/firm/firm.d.ts +4 -10
  240. package/lib/models/property/property-document.d.ts +5 -10
  241. package/lib/models/property/property-valuation.d.ts +0 -1
  242. package/lib/models/property/property.d.ts +4 -10
  243. package/lib/models/registration-invite/registration-invite.d.ts +4 -4
  244. package/lib/models/sole/sole-business.d.ts +4 -4
  245. package/lib/models/sole/sole-contact.d.ts +4 -4
  246. package/lib/models/transaction/index.d.ts +0 -1
  247. package/lib/models/transaction/transaction.d.ts +2 -5
  248. package/lib/models/user/user.d.ts +6 -12
  249. package/lib/services/http/depreciation/depreciation.service.d.ts +1 -7
  250. package/lib/services/http/depreciation/index.d.ts +0 -1
  251. package/lib/services/http/document/document-folder/document-folder-messages.enum.d.ts +6 -0
  252. package/lib/services/http/document/document-folder/document-folder.service.d.ts +6 -24
  253. package/lib/services/http/document/document-folder/index.d.ts +2 -0
  254. package/lib/services/http/document/document-messages.enum.d.ts +6 -0
  255. package/lib/services/http/document/document.service.d.ts +7 -3
  256. package/lib/services/http/document/index.d.ts +2 -1
  257. package/lib/services/http/file/file.service.d.ts +2 -0
  258. package/lib/services/http/firm/firm-messages.enum.d.ts +4 -0
  259. package/lib/services/http/firm/firm.service.d.ts +0 -1
  260. package/lib/services/http/firm/index.d.ts +1 -0
  261. package/lib/services/http/index.d.ts +0 -1
  262. package/lib/services/http/property/index.d.ts +2 -0
  263. package/lib/services/http/property/property-document/index.d.ts +1 -0
  264. package/lib/services/http/property/property-document/property-document-messages.enum.d.ts +6 -0
  265. package/lib/services/http/property/property-document/property-document.service.d.ts +1 -0
  266. package/lib/services/http/property/property-messages.enum.d.ts +4 -0
  267. package/lib/services/http/property/property-valuation/index.d.ts +2 -0
  268. package/lib/services/http/property/property-valuation/property-valuation-messages.enum.d.ts +4 -0
  269. package/lib/services/http/property/property-valuation/property-valuation.service.d.ts +21 -0
  270. package/lib/services/http/property/property.service.d.ts +1 -0
  271. package/lib/services/http/rest/rest.service.d.ts +2 -2
  272. package/lib/services/http/sole/index.d.ts +1 -1
  273. package/lib/services/http/sole/sole-business/index.d.ts +2 -0
  274. package/lib/services/http/sole/sole-business/sole-business-messages.enum.d.ts +3 -0
  275. package/lib/services/http/sole/sole-business/sole-business.service.d.ts +0 -1
  276. package/lib/services/http/transaction/index.d.ts +0 -1
  277. package/lib/services/http/transaction/transaction.service.d.ts +1 -5
  278. package/lib/services/http/user/index.d.ts +1 -0
  279. package/lib/services/http/user/user-messages.enum.d.ts +5 -0
  280. package/package.json +1 -1
  281. package/public-api.d.ts +1 -17
  282. package/esm2020/lib/db/Models/depreciation/depreciation-receipt.mjs +0 -4
  283. package/esm2020/lib/db/Models/transaction/transaction-receipt.mjs +0 -4
  284. package/esm2020/lib/interfaces/photoable.mjs +0 -2
  285. package/esm2020/lib/interfaces/receipt.interface.mjs +0 -2
  286. package/esm2020/lib/models/depreciation/depreciation-receipt.mjs +0 -11
  287. package/esm2020/lib/models/transaction/transaction-receipt.mjs +0 -11
  288. package/esm2020/lib/services/http/depreciation/depreciation-receipt/depreciation-receipt.service.mjs +0 -40
  289. package/esm2020/lib/services/http/depreciation/depreciation-receipt/index.mjs +0 -2
  290. package/esm2020/lib/services/http/receipt/index.mjs +0 -2
  291. package/esm2020/lib/services/http/receipt/receipt.service.mjs +0 -76
  292. package/esm2020/lib/services/http/sole/sole-business/messages.enum.mjs +0 -7
  293. package/esm2020/lib/services/http/transaction/transaction-receipt/transaction-receipt.service.mjs +0 -40
  294. package/lib/db/Models/depreciation/depreciation-receipt.d.ts +0 -12
  295. package/lib/db/Models/transaction/transaction-receipt.d.ts +0 -12
  296. package/lib/interfaces/photoable.d.ts +0 -13
  297. package/lib/interfaces/receipt.interface.d.ts +0 -12
  298. package/lib/models/depreciation/depreciation-receipt.d.ts +0 -8
  299. package/lib/models/transaction/transaction-receipt.d.ts +0 -8
  300. package/lib/services/http/depreciation/depreciation-receipt/depreciation-receipt.service.d.ts +0 -28
  301. package/lib/services/http/depreciation/depreciation-receipt/index.d.ts +0 -1
  302. package/lib/services/http/receipt/index.d.ts +0 -1
  303. package/lib/services/http/receipt/receipt.service.d.ts +0 -62
  304. package/lib/services/http/sole/sole-business/messages.enum.d.ts +0 -5
  305. package/lib/services/http/transaction/transaction-receipt/transaction-receipt.service.d.ts +0 -28
@@ -1,40 +0,0 @@
1
- import { Inject, Injectable } from '@angular/core';
2
- import { DepreciationReceipt } from '../../../../models/depreciation/depreciation-receipt';
3
- import { AppEventTypeEnum } from '../../../../models/event/app-event-type.enum';
4
- import { ReceiptService } from '../../receipt/receipt.service';
5
- import { AssetEntityTypeEnum } from '../../../../interfaces/asset-entity-type.enum';
6
- import * as i0 from "@angular/core";
7
- import * as i1 from "@angular/common/http";
8
- import * as i2 from "../../../event/event-dispatcher.service";
9
- import * as i3 from "../../../toast/toast.service";
10
- /**
11
- * @Todo TT-2191 refactor service when receipts API will be updated
12
- */
13
- export class DepreciationReceiptService extends ReceiptService {
14
- constructor(http, eventDispatcherService, environment, toastService) {
15
- super(http, eventDispatcherService, environment, toastService);
16
- this.http = http;
17
- this.eventDispatcherService = eventDispatcherService;
18
- this.environment = environment;
19
- this.toastService = toastService;
20
- this.modelClass = DepreciationReceipt;
21
- this.entityType = AssetEntityTypeEnum.DEPRECIATIONS;
22
- this.receiptCreatedEvent = AppEventTypeEnum.DEPRECIATION_RECEIPT_CREATED;
23
- this.receiptDeletedEvent = AppEventTypeEnum.DEPRECIATION_RECEIPT_DELETED;
24
- this.entityUpdatedWithDeletedReceiptEvent = AppEventTypeEnum.DEPRECIATION_UPDATED_WITH_DELETED_RECEIPT;
25
- this.entityUpdatedWithReceiptEvent = AppEventTypeEnum.DEPRECIATION_UPDATED_WITH_RECEIPT;
26
- this.listenEvents();
27
- }
28
- }
29
- DepreciationReceiptService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DepreciationReceiptService, deps: [{ token: i1.HttpClient }, { token: i2.EventDispatcherService }, { token: 'environment' }, { token: i3.ToastService }], target: i0.ɵɵFactoryTarget.Injectable });
30
- DepreciationReceiptService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DepreciationReceiptService, providedIn: 'root' });
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DepreciationReceiptService, decorators: [{
32
- type: Injectable,
33
- args: [{
34
- providedIn: 'root'
35
- }]
36
- }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i2.EventDispatcherService }, { type: undefined, decorators: [{
37
- type: Inject,
38
- args: ['environment']
39
- }] }, { type: i3.ToastService }]; } });
40
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVwcmVjaWF0aW9uLXJlY2VpcHQuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9zZXJ2aWNlcy9odHRwL2RlcHJlY2lhdGlvbi9kZXByZWNpYXRpb24tcmVjZWlwdC9kZXByZWNpYXRpb24tcmVjZWlwdC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ZUVudW0gPSBBcHBFdmVudFR5cGVFbnVtLkRFUFJFQ0lBVElPTl9VUERBVEVEX1dJVEhfREVMRVRFRF9SRUNFSVBUO1xuICBlbnRpdHlVcGRhdGVkV2l0aFJlY2VpcHRFdmVudDogQXBwRXZlbnRUeXBlRW51bSA9IEFwcEV2ZW50VHlwZUVudW0uREVQUkVDSUFUSU9OX1VQREFURURfV0lUSF9SRUNFSVBUO1xuXG4gIGNvbnN0cnVjdG9yKFxuICAgIHByb3RlY3RlZCBodHRwOiBIdHRwQ2xpZW50LFxuICAgIHByb3RlY3RlZCBldmVudERpc3BhdGNoZXJTZXJ2aWNlOiBFdmVudERpc3BhdGNoZXJTZXJ2aWNlLFxuICAgIEBJbmplY3QoJ2Vudmlyb25tZW50JykgcHJvdGVjdGVkIGVudmlyb25tZW50OiBhbnksXG4gICAgcHJvdGVjdGVkIHRvYXN0U2VydmljZTogVG9hc3RTZXJ2aWNlLFxuICApIHtcbiAgICBzdXBlcihodHRwLCBldmVudERpc3BhdGNoZXJTZXJ2aWNlLCBlbnZpcm9ubWVudCwgdG9hc3RTZXJ2aWNlKTtcbiAgICB0aGlzLmxpc3RlbkV2ZW50cygpO1xuICB9XG59XG4iXX0=
@@ -1,2 +0,0 @@
1
- export * from './depreciation-receipt.service';
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvc2VydmljZXMvaHR0cC9kZXByZWNpYXRpb24vZGVwcmVjaWF0aW9uLXJlY2VpcHQvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxnQ0FBZ0MsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vZGVwcmVjaWF0aW9uLXJlY2VpcHQuc2VydmljZSc7XG4iXX0=
@@ -1,2 +0,0 @@
1
- export * from './receipt.service';
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvc2VydmljZXMvaHR0cC9yZWNlaXB0L2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsbUJBQW1CLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL3JlY2VpcHQuc2VydmljZSc7XG4iXX0=
@@ -1,76 +0,0 @@
1
- import { Inject, Injectable } from '@angular/core';
2
- import { map } from 'rxjs/operators';
3
- import { AppEvent } from '../../../models/event/app-event';
4
- import { plainToClass } from 'class-transformer';
5
- import * as i0 from "@angular/core";
6
- import * as i1 from "@angular/common/http";
7
- import * as i2 from "../../event/event-dispatcher.service";
8
- import * as i3 from "../../toast/toast.service";
9
- /**
10
- * Abstract service class to work with transactions-like receipt files (transactions, depreciations, e.t.c.)
11
- * @Todo TT-2191 refactor service when receipts API will be updated
12
- */
13
- export class ReceiptService {
14
- constructor(http, eventDispatcherService, environment, toastService) {
15
- this.http = http;
16
- this.eventDispatcherService = eventDispatcherService;
17
- this.environment = environment;
18
- this.toastService = toastService;
19
- }
20
- listenEvents() {
21
- this.listenParentWithReceiptUpdated();
22
- this.listenParentWithoutReceiptUpdated();
23
- }
24
- /**
25
- * Entity is necessary to take the ID and the receipt file from it.
26
- */
27
- add(receiptEntity) {
28
- const formData = new FormData();
29
- formData.append('file', receiptEntity.file);
30
- return this.http.post(`${this.environment.apiV2}/${this.entityType}/${receiptEntity.id}/receipts`, formData)
31
- .pipe(map((receipt) => {
32
- const uploadedReceipt = this.createModelInstance(receipt);
33
- this.eventDispatcherService.dispatch(new AppEvent(this.receiptCreatedEvent, uploadedReceipt));
34
- return uploadedReceipt;
35
- }));
36
- }
37
- delete(receiptEntity) {
38
- return this.http.delete(`${this.environment.apiV2}/${this.entityType}/${receiptEntity.id}/receipts/${receiptEntity.receipt.id}`)
39
- .pipe(map(() => {
40
- this.eventDispatcherService.dispatch(new AppEvent(this.receiptDeletedEvent, receiptEntity));
41
- }));
42
- }
43
- /**
44
- * Parent entity was updated with attached receipt
45
- */
46
- listenParentWithReceiptUpdated() {
47
- this.eventDispatcherService.on(this.entityUpdatedWithReceiptEvent)
48
- .subscribe((receiptEntity) => {
49
- this.add(receiptEntity).subscribe();
50
- });
51
- }
52
- /**
53
- * Parent entity was updated, but receipt was removed
54
- */
55
- listenParentWithoutReceiptUpdated() {
56
- this.eventDispatcherService.on(this.entityUpdatedWithDeletedReceiptEvent)
57
- .subscribe((receiptEntity) => {
58
- this.delete(receiptEntity).subscribe();
59
- });
60
- }
61
- createModelInstance(data) {
62
- return plainToClass(this.modelClass, data);
63
- }
64
- }
65
- ReceiptService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ReceiptService, deps: [{ token: i1.HttpClient }, { token: i2.EventDispatcherService }, { token: 'environment' }, { token: i3.ToastService }], target: i0.ɵɵFactoryTarget.Injectable });
66
- ReceiptService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ReceiptService, providedIn: 'root' });
67
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ReceiptService, decorators: [{
68
- type: Injectable,
69
- args: [{
70
- providedIn: 'root'
71
- }]
72
- }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i2.EventDispatcherService }, { type: undefined, decorators: [{
73
- type: Inject,
74
- args: ['environment']
75
- }] }, { type: i3.ToastService }]; } });
76
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVjZWl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GFyZW50TW9kZWwpID0+IHtcbiAgICAgICAgdGhpcy5kZWxldGUocmVjZWlwdEVudGl0eSkuc3Vic2NyaWJlKCk7XG4gICAgICB9KTtcbiAgfVxuXG4gIHByaXZhdGUgY3JlYXRlTW9kZWxJbnN0YW5jZShkYXRhOiBCYXNlTW9kZWwpOiBNb2RlbCB7XG4gICAgcmV0dXJuIHBsYWluVG9DbGFzcyh0aGlzLm1vZGVsQ2xhc3MsIGRhdGEpO1xuICB9XG59XG4iXX0=
@@ -1,7 +0,0 @@
1
- export var MessagesEnum;
2
- (function (MessagesEnum) {
3
- MessagesEnum["LOGO_UPDATED"] = "Logo updated successfully";
4
- MessagesEnum["LOGO_ERROR_FORMAT"] = "Wrong file format. Allowed extensions: jpg, img, png";
5
- MessagesEnum["LOGO_ERROR_SIZE"] = "The file is too big. Maximum size is 2mb";
6
- })(MessagesEnum || (MessagesEnum = {}));
7
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVzc2FnZXMuZW51bS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9zZXJ2aWNlcy9odHRwL3NvbGUvc29sZS1idXNpbmVzcy9tZXNzYWdlcy5lbnVtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBTixJQUFZLFlBSVg7QUFKRCxXQUFZLFlBQVk7SUFDdEIsMERBQTBDLENBQUE7SUFDMUMsMEZBQTBFLENBQUE7SUFDMUUsNEVBQTRELENBQUE7QUFDOUQsQ0FBQyxFQUpXLFlBQVksS0FBWixZQUFZLFFBSXZCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGVudW0gTWVzc2FnZXNFbnVtIHtcbiAgTE9HT19VUERBVEVEID0gJ0xvZ28gdXBkYXRlZCBzdWNjZXNzZnVsbHknLFxuICBMT0dPX0VSUk9SX0ZPUk1BVCA9ICdXcm9uZyBmaWxlIGZvcm1hdC4gQWxsb3dlZCBleHRlbnNpb25zOiBqcGcsIGltZywgcG5nJyxcbiAgTE9HT19FUlJPUl9TSVpFID0gJ1RoZSBmaWxlIGlzIHRvbyBiaWcuIE1heGltdW0gc2l6ZSBpcyAybWInXG59XG4iXX0=
@@ -1,40 +0,0 @@
1
- import { Inject, Injectable } from '@angular/core';
2
- import { AppEventTypeEnum } from '../../../../models/event/app-event-type.enum';
3
- import { ReceiptService } from '../../receipt/receipt.service';
4
- import { AssetEntityTypeEnum } from '../../../../interfaces/asset-entity-type.enum';
5
- import { TransactionReceipt } from '../../../../models/transaction/transaction-receipt';
6
- import * as i0 from "@angular/core";
7
- import * as i1 from "@angular/common/http";
8
- import * as i2 from "../../../event/event-dispatcher.service";
9
- import * as i3 from "../../../toast/toast.service";
10
- /**
11
- * @Todo TT-2191 refactor service when receipts API will be updated
12
- */
13
- export class TransactionReceiptService extends ReceiptService {
14
- constructor(http, eventDispatcherService, environment, toastService) {
15
- super(http, eventDispatcherService, environment, toastService);
16
- this.http = http;
17
- this.eventDispatcherService = eventDispatcherService;
18
- this.environment = environment;
19
- this.toastService = toastService;
20
- this.modelClass = TransactionReceipt;
21
- this.entityType = AssetEntityTypeEnum.TRANSACTIONS;
22
- this.receiptCreatedEvent = AppEventTypeEnum.TRANSACTION_RECEIPT_CREATED;
23
- this.receiptDeletedEvent = AppEventTypeEnum.TRANSACTION_RECEIPT_DELETED;
24
- this.entityUpdatedWithReceiptEvent = AppEventTypeEnum.TRANSACTION_UPDATED_WITH_RECEIPT;
25
- this.entityUpdatedWithDeletedReceiptEvent = AppEventTypeEnum.TRANSACTION_UPDATED_WITH_DELETED_RECEIPT;
26
- this.listenEvents();
27
- }
28
- }
29
- TransactionReceiptService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TransactionReceiptService, deps: [{ token: i1.HttpClient }, { token: i2.EventDispatcherService }, { token: 'environment' }, { token: i3.ToastService }], target: i0.ɵɵFactoryTarget.Injectable });
30
- TransactionReceiptService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TransactionReceiptService, providedIn: 'root' });
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TransactionReceiptService, decorators: [{
32
- type: Injectable,
33
- args: [{
34
- providedIn: 'root'
35
- }]
36
- }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i2.EventDispatcherService }, { type: undefined, decorators: [{
37
- type: Inject,
38
- args: ['environment']
39
- }] }, { type: i3.ToastService }]; } });
40
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNhY3Rpb24tcmVjZWlwdC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHQtY29yZS9zcmMvbGliL3NlcnZpY2VzL2h0dHAvdHJhbnNhY3Rpb24vdHJhbnNhY3Rpb24tcmVjZWlwdC90cmFuc2FjdGlvbi1yZWNlaXB0LnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE1BQU0sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFbkQsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sOENBQThDLENBQUM7QUFDaEYsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLCtCQUErQixDQUFDO0FBQy9ELE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLCtDQUErQyxDQUFDO0FBRXBGLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLG9EQUFvRCxDQUFDOzs7OztBQUt4Rjs7R0FFRztBQUlILE1BQU0sT0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lY3RlZCBlbnZpcm9ubWVudDogYW55LFxuICAgIHByb3RlY3RlZCB0b2FzdFNlcnZpY2U6IFRvYXN0U2VydmljZSxcbiAgKSB7XG4gICAgc3VwZXIoaHR0cCwgZXZlbnREaXNwYXRjaGVyU2VydmljZSwgZW52aXJvbm1lbnQsIHRvYXN0U2VydmljZSk7XG4gICAgdGhpcy5saXN0ZW5FdmVudHMoKTtcbiAgfVxufVxuIl19
@@ -1,12 +0,0 @@
1
- import { Depreciation } from './depreciation';
2
- import { AbstractModel } from '../abstract-model';
3
- export declare class DepreciationReceipt extends AbstractModel {
4
- id?: number;
5
- name?: string;
6
- originalName?: string;
7
- size?: number;
8
- mimeType?: string;
9
- createdAt?: Date;
10
- updatedAt?: Date;
11
- depreciation?: Depreciation;
12
- }
@@ -1,12 +0,0 @@
1
- import { Transaction } from './transaction';
2
- import { AbstractModel } from '../abstract-model';
3
- export declare class TransactionReceipt extends AbstractModel {
4
- id?: number;
5
- name?: string;
6
- originalName?: string;
7
- size?: number;
8
- mimeType?: string;
9
- createdAt?: Date;
10
- updatedAt?: Date;
11
- transaction?: Transaction;
12
- }
@@ -1,13 +0,0 @@
1
- /**
2
- * Interface that show if object has photo
3
- */
4
- export interface Photoable {
5
- /**
6
- * Get link to object's photo
7
- */
8
- getPhoto(): string;
9
- /**
10
- * get object's initials for photo placeholder
11
- */
12
- getPhotoPlaceholder(): string;
13
- }
@@ -1,12 +0,0 @@
1
- import { IAsset } from './asset.interface';
2
- import { ChartAccounts } from '../models/chart-accounts/chart-accounts';
3
- /**
4
- * Interface that contains main fields for transaction-like classes
5
- */
6
- export interface IReceipt {
7
- id?: number;
8
- amount?: number;
9
- receipt: IAsset;
10
- chartAccounts: ChartAccounts;
11
- getDate(): Date;
12
- }
@@ -1,8 +0,0 @@
1
- import { DepreciationReceipt as DepreciationReceiptBase } from '../../db/Models/depreciation/depreciation-receipt';
2
- import { IAsset } from '../../interfaces/asset.interface';
3
- import { AssetTypeEnum } from '../../interfaces/asset-type.enum';
4
- import { AssetEntityTypeEnum } from '../../interfaces/asset-entity-type.enum';
5
- export declare class DepreciationReceipt extends DepreciationReceiptBase implements IAsset {
6
- type: AssetTypeEnum;
7
- entityType: AssetEntityTypeEnum;
8
- }
@@ -1,8 +0,0 @@
1
- import { TransactionReceipt as TransactionReceiptBase } from '../../db/Models/transaction/transaction-receipt';
2
- import { IAsset } from '../../interfaces/asset.interface';
3
- import { AssetTypeEnum } from '../../interfaces/asset-type.enum';
4
- import { AssetEntityTypeEnum } from '../../interfaces/asset-entity-type.enum';
5
- export declare class TransactionReceipt extends TransactionReceiptBase implements IAsset {
6
- type: AssetTypeEnum;
7
- entityType: AssetEntityTypeEnum;
8
- }
@@ -1,28 +0,0 @@
1
- import { DepreciationReceipt as DepreciationReceiptBase } from '../../../../db/Models/depreciation/depreciation-receipt';
2
- import { DepreciationReceipt } from '../../../../models/depreciation/depreciation-receipt';
3
- import { AppEventTypeEnum } from '../../../../models/event/app-event-type.enum';
4
- import { Depreciation } from '../../../../models/depreciation/depreciation';
5
- import { ReceiptService } from '../../receipt/receipt.service';
6
- import { AssetEntityTypeEnum } from '../../../../interfaces/asset-entity-type.enum';
7
- import { HttpClient } from '@angular/common/http';
8
- import { EventDispatcherService } from '../../../event/event-dispatcher.service';
9
- import { ToastService } from '../../../toast/toast.service';
10
- import * as i0 from "@angular/core";
11
- /**
12
- * @Todo TT-2191 refactor service when receipts API will be updated
13
- */
14
- export declare class DepreciationReceiptService extends ReceiptService<Depreciation, DepreciationReceiptBase, DepreciationReceipt> {
15
- protected http: HttpClient;
16
- protected eventDispatcherService: EventDispatcherService;
17
- protected environment: any;
18
- protected toastService: ToastService;
19
- modelClass: typeof DepreciationReceipt;
20
- entityType: AssetEntityTypeEnum;
21
- receiptCreatedEvent: AppEventTypeEnum;
22
- receiptDeletedEvent: AppEventTypeEnum;
23
- entityUpdatedWithDeletedReceiptEvent: AppEventTypeEnum;
24
- entityUpdatedWithReceiptEvent: AppEventTypeEnum;
25
- constructor(http: HttpClient, eventDispatcherService: EventDispatcherService, environment: any, toastService: ToastService);
26
- static ɵfac: i0.ɵɵFactoryDeclaration<DepreciationReceiptService, never>;
27
- static ɵprov: i0.ɵɵInjectableDeclaration<DepreciationReceiptService>;
28
- }
@@ -1 +0,0 @@
1
- export * from './depreciation-receipt.service';
@@ -1 +0,0 @@
1
- export * from './receipt.service';
@@ -1,62 +0,0 @@
1
- import { Type } from '@angular/core';
2
- import { AssetEntityTypeEnum } from '../../../interfaces/asset-entity-type.enum';
3
- import { IEventListener } from '../../../interfaces/event-listener.interface';
4
- import { Transaction } from '../../../models/transaction/transaction';
5
- import { Depreciation } from '../../../models/depreciation/depreciation';
6
- import { AppEventTypeEnum } from '../../../models/event/app-event-type.enum';
7
- import { TransactionReceipt as TransactionReceiptBase } from '../../../db/Models/transaction/transaction-receipt';
8
- import { DepreciationReceipt as DepreciationReceiptBase } from '../../../db/Models/depreciation/depreciation-receipt';
9
- import { Observable } from 'rxjs';
10
- import { HttpClient } from '@angular/common/http';
11
- import { EventDispatcherService } from '../../event/event-dispatcher.service';
12
- import { ToastService } from '../../toast/toast.service';
13
- import * as i0 from "@angular/core";
14
- /**
15
- * Abstract service class to work with transactions-like receipt files (transactions, depreciations, e.t.c.)
16
- * @Todo TT-2191 refactor service when receipts API will be updated
17
- */
18
- export declare abstract class ReceiptService<ParentModel extends Transaction | Depreciation, BaseModel extends TransactionReceiptBase | DepreciationReceiptBase, Model extends BaseModel> implements IEventListener {
19
- protected http: HttpClient;
20
- protected eventDispatcherService: EventDispatcherService;
21
- protected environment: any;
22
- protected toastService: ToastService;
23
- /**
24
- * Needed to fulfill endpoint to API
25
- */
26
- abstract entityType: AssetEntityTypeEnum;
27
- abstract modelClass: Type<Model>;
28
- /**
29
- * Event type that will be dispatched when receipt will be uploaded
30
- */
31
- abstract receiptCreatedEvent: AppEventTypeEnum;
32
- /**
33
- * Event type that will be dispatched when receipt will be deleted
34
- */
35
- abstract receiptDeletedEvent: AppEventTypeEnum;
36
- /**
37
- * Event type that will be dispatched when parent entity (transaction-like class) will be updated with attached receipt
38
- */
39
- abstract entityUpdatedWithReceiptEvent: AppEventTypeEnum;
40
- /**
41
- * Event type that will be dispatched when parent entity (transaction-like class) will be updated with deleted receipt
42
- */
43
- abstract entityUpdatedWithDeletedReceiptEvent: AppEventTypeEnum;
44
- protected constructor(http: HttpClient, eventDispatcherService: EventDispatcherService, environment: any, toastService: ToastService);
45
- listenEvents(): void;
46
- /**
47
- * Entity is necessary to take the ID and the receipt file from it.
48
- */
49
- add(receiptEntity: ParentModel): Observable<Model>;
50
- delete(receiptEntity: ParentModel): Observable<void>;
51
- /**
52
- * Parent entity was updated with attached receipt
53
- */
54
- private listenParentWithReceiptUpdated;
55
- /**
56
- * Parent entity was updated, but receipt was removed
57
- */
58
- private listenParentWithoutReceiptUpdated;
59
- private createModelInstance;
60
- static ɵfac: i0.ɵɵFactoryDeclaration<ReceiptService<any, any, any>, never>;
61
- static ɵprov: i0.ɵɵInjectableDeclaration<ReceiptService<any, any, any>>;
62
- }
@@ -1,5 +0,0 @@
1
- export declare enum MessagesEnum {
2
- LOGO_UPDATED = "Logo updated successfully",
3
- LOGO_ERROR_FORMAT = "Wrong file format. Allowed extensions: jpg, img, png",
4
- LOGO_ERROR_SIZE = "The file is too big. Maximum size is 2mb"
5
- }
@@ -1,28 +0,0 @@
1
- import { Transaction } from '../../../../models/transaction/transaction';
2
- import { AppEventTypeEnum } from '../../../../models/event/app-event-type.enum';
3
- import { ReceiptService } from '../../receipt/receipt.service';
4
- import { AssetEntityTypeEnum } from '../../../../interfaces/asset-entity-type.enum';
5
- import { TransactionReceipt as TransactionReceiptBase } from '../../../../db/Models/transaction/transaction-receipt';
6
- import { TransactionReceipt } from '../../../../models/transaction/transaction-receipt';
7
- import { HttpClient } from '@angular/common/http';
8
- import { EventDispatcherService } from '../../../event/event-dispatcher.service';
9
- import { ToastService } from '../../../toast/toast.service';
10
- import * as i0 from "@angular/core";
11
- /**
12
- * @Todo TT-2191 refactor service when receipts API will be updated
13
- */
14
- export declare class TransactionReceiptService extends ReceiptService<Transaction, TransactionReceiptBase, TransactionReceipt> {
15
- protected http: HttpClient;
16
- protected eventDispatcherService: EventDispatcherService;
17
- protected environment: any;
18
- protected toastService: ToastService;
19
- modelClass: typeof TransactionReceipt;
20
- entityType: AssetEntityTypeEnum;
21
- receiptCreatedEvent: AppEventTypeEnum;
22
- receiptDeletedEvent: AppEventTypeEnum;
23
- entityUpdatedWithReceiptEvent: AppEventTypeEnum;
24
- entityUpdatedWithDeletedReceiptEvent: AppEventTypeEnum;
25
- constructor(http: HttpClient, eventDispatcherService: EventDispatcherService, environment: any, toastService: ToastService);
26
- static ɵfac: i0.ɵɵFactoryDeclaration<TransactionReceiptService, never>;
27
- static ɵprov: i0.ɵɵInjectableDeclaration<TransactionReceiptService>;
28
- }