@nerdjs/sales-kit 1.0.9 → 2.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 (274) hide show
  1. package/dist/entities/archerFile/archerFile.d.ts +11 -0
  2. package/dist/entities/archerFile/archerFile.js +48 -0
  3. package/dist/entities/archerFile/archerFile.js.map +1 -0
  4. package/dist/entities/archerFile/helper.d.ts +5 -0
  5. package/dist/entities/archerFile/helper.js +16 -0
  6. package/dist/entities/archerFile/helper.js.map +1 -0
  7. package/dist/entities/archerFile/index.d.ts +2 -0
  8. package/dist/entities/archerFile/index.js +3 -0
  9. package/dist/entities/archerFile/index.js.map +1 -0
  10. package/dist/entities/customer/index.d.ts +2 -1
  11. package/dist/entities/customer/index.js +2 -1
  12. package/dist/entities/customer/index.js.map +1 -1
  13. package/dist/entities/holiday/helper.d.ts +2 -0
  14. package/dist/entities/holiday/helper.js +4 -0
  15. package/dist/entities/holiday/helper.js.map +1 -1
  16. package/dist/entities/index.d.ts +3 -0
  17. package/dist/entities/index.js +3 -0
  18. package/dist/entities/index.js.map +1 -1
  19. package/dist/entities/location/helper.d.ts +3 -0
  20. package/dist/entities/location/helper.js +9 -0
  21. package/dist/entities/location/helper.js.map +1 -1
  22. package/dist/entities/location/index.d.ts +2 -2
  23. package/dist/entities/location/index.js +2 -2
  24. package/dist/entities/location/index.js.map +1 -1
  25. package/dist/entities/location/location.d.ts +5 -0
  26. package/dist/entities/location/location.js +7 -0
  27. package/dist/entities/location/location.js.map +1 -1
  28. package/dist/entities/path/helper.d.ts +5 -0
  29. package/dist/entities/path/helper.js +16 -0
  30. package/dist/entities/path/helper.js.map +1 -0
  31. package/dist/entities/path/index.d.ts +2 -0
  32. package/dist/entities/path/index.js +3 -0
  33. package/dist/entities/path/index.js.map +1 -0
  34. package/dist/entities/path/path.d.ts +20 -0
  35. package/dist/entities/path/path.js +35 -0
  36. package/dist/entities/path/path.js.map +1 -0
  37. package/dist/entities/quoteResponse/quoteResponse.d.ts +1 -0
  38. package/dist/entities/quoteResponse/quoteResponse.js +2 -0
  39. package/dist/entities/quoteResponse/quoteResponse.js.map +1 -1
  40. package/dist/entities/tenderCommodity/helper.d.ts +5 -0
  41. package/dist/entities/tenderCommodity/helper.js +16 -0
  42. package/dist/entities/tenderCommodity/helper.js.map +1 -0
  43. package/dist/entities/tenderCommodity/index.d.ts +2 -0
  44. package/dist/entities/tenderCommodity/index.js +3 -0
  45. package/dist/entities/tenderCommodity/index.js.map +1 -0
  46. package/dist/entities/tenderCommodity/tenderCommodity.d.ts +11 -0
  47. package/dist/entities/tenderCommodity/tenderCommodity.js +39 -0
  48. package/dist/entities/tenderCommodity/tenderCommodity.js.map +1 -0
  49. package/dist/entities/tenderRequest/helper.d.ts +5 -0
  50. package/dist/entities/tenderRequest/helper.js +16 -0
  51. package/dist/entities/tenderRequest/helper.js.map +1 -0
  52. package/dist/entities/tenderRequest/index.d.ts +2 -0
  53. package/dist/entities/tenderRequest/index.js +3 -0
  54. package/dist/entities/tenderRequest/index.js.map +1 -0
  55. package/dist/entities/tenderRequest/tenderRequest.d.ts +14 -0
  56. package/dist/entities/tenderRequest/tenderRequest.js +39 -0
  57. package/dist/entities/tenderRequest/tenderRequest.js.map +1 -0
  58. package/dist/entities/tenderResponse/helper.d.ts +5 -0
  59. package/dist/entities/tenderResponse/helper.js +16 -0
  60. package/dist/entities/tenderResponse/helper.js.map +1 -0
  61. package/dist/entities/tenderResponse/index.d.ts +2 -0
  62. package/dist/entities/tenderResponse/index.js +3 -0
  63. package/dist/entities/tenderResponse/index.js.map +1 -0
  64. package/dist/entities/tenderResponse/tenderResponse.d.ts +41 -0
  65. package/dist/entities/tenderResponse/tenderResponse.js +49 -0
  66. package/dist/entities/tenderResponse/tenderResponse.js.map +1 -0
  67. package/dist/entities/tenderStop/helper.d.ts +5 -0
  68. package/dist/entities/tenderStop/helper.js +16 -0
  69. package/dist/entities/tenderStop/helper.js.map +1 -0
  70. package/dist/entities/tenderStop/index.d.ts +2 -0
  71. package/dist/entities/tenderStop/index.js +3 -0
  72. package/dist/entities/tenderStop/index.js.map +1 -0
  73. package/dist/entities/tenderStop/tenderStop.d.ts +22 -0
  74. package/dist/entities/tenderStop/tenderStop.js +59 -0
  75. package/dist/entities/tenderStop/tenderStop.js.map +1 -0
  76. package/dist/hooks/customer/customerAutocomplete.d.ts +18 -0
  77. package/dist/hooks/customer/customerAutocomplete.js +36 -0
  78. package/dist/hooks/customer/customerAutocomplete.js.map +1 -0
  79. package/dist/hooks/index.d.ts +1 -0
  80. package/dist/hooks/index.js +1 -0
  81. package/dist/hooks/index.js.map +1 -1
  82. package/dist/hooks/locationsForm/locationsForm.d.ts +11 -2
  83. package/dist/hooks/locationsForm/locationsForm.js +117 -13
  84. package/dist/hooks/locationsForm/locationsForm.js.map +1 -1
  85. package/dist/hooks/quote/form.d.ts +2 -0
  86. package/dist/hooks/quote/form.js +59 -32
  87. package/dist/hooks/quote/form.js.map +1 -1
  88. package/dist/hooks/quote/helpers.d.ts +13 -8
  89. package/dist/hooks/quote/helpers.js +232 -92
  90. package/dist/hooks/quote/helpers.js.map +1 -1
  91. package/dist/hooks/quote/result.d.ts +8 -1
  92. package/dist/hooks/quote/result.js +269 -52
  93. package/dist/hooks/quote/result.js.map +1 -1
  94. package/dist/hooks/quote/template.d.ts +8 -1
  95. package/dist/hooks/quote/template.js +49 -41
  96. package/dist/hooks/quote/template.js.map +1 -1
  97. package/dist/hooks/tender/constants.d.ts +200 -0
  98. package/dist/hooks/tender/constants.js +77 -0
  99. package/dist/hooks/tender/constants.js.map +1 -0
  100. package/dist/hooks/tender/form.d.ts +10 -0
  101. package/dist/hooks/tender/form.js +669 -0
  102. package/dist/hooks/tender/form.js.map +1 -0
  103. package/dist/hooks/tender/helpers.d.ts +51 -0
  104. package/dist/hooks/tender/helpers.js +465 -0
  105. package/dist/hooks/tender/helpers.js.map +1 -0
  106. package/dist/hooks/tender/index.d.ts +1 -0
  107. package/dist/hooks/tender/index.js +2 -0
  108. package/dist/hooks/tender/index.js.map +1 -0
  109. package/dist/hooks/tender/template.d.ts +10 -0
  110. package/dist/hooks/tender/template.js +25 -0
  111. package/dist/hooks/tender/template.js.map +1 -0
  112. package/dist/locales/salesKitEn.d.ts +66 -0
  113. package/dist/locales/salesKitEn.js +66 -0
  114. package/dist/locales/salesKitEn.js.map +1 -1
  115. package/dist/redux/api/index.d.ts +1 -0
  116. package/dist/redux/api/index.js +2 -0
  117. package/dist/redux/api/index.js.map +1 -0
  118. package/dist/redux/api/salesApi.d.ts +1 -0
  119. package/dist/redux/api/salesApi.js +22 -0
  120. package/dist/redux/api/salesApi.js.map +1 -0
  121. package/dist/redux/customer/customerEndpoints.d.ts +28 -0
  122. package/dist/redux/customer/customerEndpoints.js +76 -0
  123. package/dist/redux/customer/customerEndpoints.js.map +1 -0
  124. package/dist/redux/customer/index.d.ts +1 -4
  125. package/dist/redux/customer/index.js +1 -4
  126. package/dist/redux/customer/index.js.map +1 -1
  127. package/dist/redux/holiday/holidayEndpoints.d.ts +26 -0
  128. package/dist/redux/holiday/holidayEndpoints.js +63 -0
  129. package/dist/redux/holiday/holidayEndpoints.js.map +1 -0
  130. package/dist/redux/holiday/index.d.ts +2 -0
  131. package/dist/redux/holiday/index.js +3 -0
  132. package/dist/redux/holiday/index.js.map +1 -0
  133. package/dist/redux/index.d.ts +2 -0
  134. package/dist/redux/index.js +2 -0
  135. package/dist/redux/index.js.map +1 -1
  136. package/dist/redux/load/index.d.ts +1 -4
  137. package/dist/redux/load/index.js +1 -4
  138. package/dist/redux/load/index.js.map +1 -1
  139. package/dist/redux/load/loadEndpoints.d.ts +26 -0
  140. package/dist/redux/load/loadEndpoints.js +63 -0
  141. package/dist/redux/load/loadEndpoints.js.map +1 -0
  142. package/dist/redux/loadAdjustment/index.d.ts +1 -4
  143. package/dist/redux/loadAdjustment/index.js +1 -4
  144. package/dist/redux/loadAdjustment/index.js.map +1 -1
  145. package/dist/redux/loadAdjustment/loadAdjustmentEndpoints.d.ts +26 -0
  146. package/dist/redux/loadAdjustment/loadAdjustmentEndpoints.js +63 -0
  147. package/dist/redux/loadAdjustment/loadAdjustmentEndpoints.js.map +1 -0
  148. package/dist/redux/location/index.d.ts +1 -4
  149. package/dist/redux/location/index.js +1 -4
  150. package/dist/redux/location/index.js.map +1 -1
  151. package/dist/redux/location/locationEndpoints.d.ts +37 -0
  152. package/dist/redux/location/locationEndpoints.js +107 -0
  153. package/dist/redux/location/locationEndpoints.js.map +1 -0
  154. package/dist/redux/quote/index.d.ts +0 -1
  155. package/dist/redux/quote/index.js +0 -1
  156. package/dist/redux/quote/index.js.map +1 -1
  157. package/dist/redux/quote/quoteAction.d.ts +12 -78
  158. package/dist/redux/quote/quoteAction.js +221 -165
  159. package/dist/redux/quote/quoteAction.js.map +1 -1
  160. package/dist/redux/quote/quoteEndpoints.d.ts +114 -0
  161. package/dist/redux/quote/quoteEndpoints.js +80 -0
  162. package/dist/redux/quote/quoteEndpoints.js.map +1 -0
  163. package/dist/redux/quote/quoteHooks.d.ts +171 -0
  164. package/dist/redux/quote/quoteHooks.js +51 -0
  165. package/dist/redux/quote/quoteHooks.js.map +1 -0
  166. package/dist/redux/quote/quoteReducer.d.ts +5 -1
  167. package/dist/redux/quote/quoteReducer.js +8 -39
  168. package/dist/redux/quote/quoteReducer.js.map +1 -1
  169. package/dist/redux/quote/quoteSelector.d.ts +8 -89
  170. package/dist/redux/quote/quoteSelector.js +27 -41
  171. package/dist/redux/quote/quoteSelector.js.map +1 -1
  172. package/dist/redux/quoteAccessorial/index.d.ts +1 -3
  173. package/dist/redux/quoteAccessorial/index.js +1 -3
  174. package/dist/redux/quoteAccessorial/index.js.map +1 -1
  175. package/dist/redux/quoteAccessorial/quoteAccessorialEndpoints.d.ts +18 -0
  176. package/dist/redux/quoteAccessorial/quoteAccessorialEndpoints.js +52 -0
  177. package/dist/redux/quoteAccessorial/quoteAccessorialEndpoints.js.map +1 -0
  178. package/dist/redux/salesKitReducer.d.ts +3 -18
  179. package/dist/redux/salesKitReducer.js +2 -12
  180. package/dist/redux/salesKitReducer.js.map +1 -1
  181. package/dist/redux/shipcon/index.d.ts +1 -4
  182. package/dist/redux/shipcon/index.js +1 -4
  183. package/dist/redux/shipcon/index.js.map +1 -1
  184. package/dist/redux/shipcon/shipconEndpoints.d.ts +26 -0
  185. package/dist/redux/shipcon/shipconEndpoints.js +63 -0
  186. package/dist/redux/shipcon/shipconEndpoints.js.map +1 -0
  187. package/dist/redux/tender/index.d.ts +0 -0
  188. package/dist/redux/tender/index.js +2 -0
  189. package/dist/redux/tender/index.js.map +1 -0
  190. package/dist/redux/tender/tenderEndpoints.d.ts +34 -0
  191. package/dist/redux/tender/tenderEndpoints.js +52 -0
  192. package/dist/redux/tender/tenderEndpoints.js.map +1 -0
  193. package/dist/redux/tender/tenderSelector.d.ts +53 -0
  194. package/dist/redux/tender/tenderSelector.js +34 -0
  195. package/dist/redux/tender/tenderSelector.js.map +1 -0
  196. package/dist/redux/tender/tenderSlice.d.ts +40 -0
  197. package/dist/redux/tender/tenderSlice.js +69 -0
  198. package/dist/redux/tender/tenderSlice.js.map +1 -0
  199. package/dist/redux/types.d.ts +15 -0
  200. package/dist/redux/types.js +10 -0
  201. package/dist/redux/types.js.map +1 -0
  202. package/package.json +4 -3
  203. package/dist/redux/customer/customerActions.d.ts +0 -97
  204. package/dist/redux/customer/customerActions.js +0 -210
  205. package/dist/redux/customer/customerActions.js.map +0 -1
  206. package/dist/redux/customer/customerReducer.d.ts +0 -2
  207. package/dist/redux/customer/customerReducer.js +0 -42
  208. package/dist/redux/customer/customerReducer.js.map +0 -1
  209. package/dist/redux/customer/customerSelector.d.ts +0 -27
  210. package/dist/redux/customer/customerSelector.js +0 -38
  211. package/dist/redux/customer/customerSelector.js.map +0 -1
  212. package/dist/redux/customer/customerState.d.ts +0 -11
  213. package/dist/redux/customer/customerState.js +0 -2
  214. package/dist/redux/customer/customerState.js.map +0 -1
  215. package/dist/redux/load/loadActions.d.ts +0 -80
  216. package/dist/redux/load/loadActions.js +0 -172
  217. package/dist/redux/load/loadActions.js.map +0 -1
  218. package/dist/redux/load/loadReducer.d.ts +0 -2
  219. package/dist/redux/load/loadReducer.js +0 -35
  220. package/dist/redux/load/loadReducer.js.map +0 -1
  221. package/dist/redux/load/loadSelector.d.ts +0 -27
  222. package/dist/redux/load/loadSelector.js +0 -19
  223. package/dist/redux/load/loadSelector.js.map +0 -1
  224. package/dist/redux/load/loadState.d.ts +0 -8
  225. package/dist/redux/load/loadState.js +0 -2
  226. package/dist/redux/load/loadState.js.map +0 -1
  227. package/dist/redux/loadAdjustment/loadAdjustmentActions.d.ts +0 -80
  228. package/dist/redux/loadAdjustment/loadAdjustmentActions.js +0 -172
  229. package/dist/redux/loadAdjustment/loadAdjustmentActions.js.map +0 -1
  230. package/dist/redux/loadAdjustment/loadAdjustmentReducer.d.ts +0 -2
  231. package/dist/redux/loadAdjustment/loadAdjustmentReducer.js +0 -35
  232. package/dist/redux/loadAdjustment/loadAdjustmentReducer.js.map +0 -1
  233. package/dist/redux/loadAdjustment/loadAdjustmentSelector.d.ts +0 -15
  234. package/dist/redux/loadAdjustment/loadAdjustmentSelector.js +0 -12
  235. package/dist/redux/loadAdjustment/loadAdjustmentSelector.js.map +0 -1
  236. package/dist/redux/loadAdjustment/loadAdjustmentState.d.ts +0 -8
  237. package/dist/redux/loadAdjustment/loadAdjustmentState.js +0 -2
  238. package/dist/redux/loadAdjustment/loadAdjustmentState.js.map +0 -1
  239. package/dist/redux/location/locationActions.d.ts +0 -101
  240. package/dist/redux/location/locationActions.js +0 -218
  241. package/dist/redux/location/locationActions.js.map +0 -1
  242. package/dist/redux/location/locationReducer.d.ts +0 -2
  243. package/dist/redux/location/locationReducer.js +0 -54
  244. package/dist/redux/location/locationReducer.js.map +0 -1
  245. package/dist/redux/location/locationSelector.d.ts +0 -53
  246. package/dist/redux/location/locationSelector.js +0 -32
  247. package/dist/redux/location/locationSelector.js.map +0 -1
  248. package/dist/redux/location/locationState.d.ts +0 -15
  249. package/dist/redux/location/locationState.js +0 -2
  250. package/dist/redux/location/locationState.js.map +0 -1
  251. package/dist/redux/quote/quoteMiddleware.d.ts +0 -2
  252. package/dist/redux/quote/quoteMiddleware.js +0 -31
  253. package/dist/redux/quote/quoteMiddleware.js.map +0 -1
  254. package/dist/redux/quoteAccessorial/quoteAccessorialActions.d.ts +0 -70
  255. package/dist/redux/quoteAccessorial/quoteAccessorialActions.js +0 -149
  256. package/dist/redux/quoteAccessorial/quoteAccessorialActions.js.map +0 -1
  257. package/dist/redux/quoteAccessorial/quoteAccessorialReducer.d.ts +0 -2
  258. package/dist/redux/quoteAccessorial/quoteAccessorialReducer.js +0 -29
  259. package/dist/redux/quoteAccessorial/quoteAccessorialReducer.js.map +0 -1
  260. package/dist/redux/quoteAccessorial/quoteAccessorialState.d.ts +0 -8
  261. package/dist/redux/quoteAccessorial/quoteAccessorialState.js +0 -2
  262. package/dist/redux/quoteAccessorial/quoteAccessorialState.js.map +0 -1
  263. package/dist/redux/shipcon/shipconActions.d.ts +0 -80
  264. package/dist/redux/shipcon/shipconActions.js +0 -172
  265. package/dist/redux/shipcon/shipconActions.js.map +0 -1
  266. package/dist/redux/shipcon/shipconReducer.d.ts +0 -2
  267. package/dist/redux/shipcon/shipconReducer.js +0 -35
  268. package/dist/redux/shipcon/shipconReducer.js.map +0 -1
  269. package/dist/redux/shipcon/shipconSelector.d.ts +0 -22
  270. package/dist/redux/shipcon/shipconSelector.js +0 -19
  271. package/dist/redux/shipcon/shipconSelector.js.map +0 -1
  272. package/dist/redux/shipcon/shipconState.d.ts +0 -8
  273. package/dist/redux/shipcon/shipconState.js +0 -2
  274. package/dist/redux/shipcon/shipconState.js.map +0 -1
@@ -1,38 +1,63 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Sheet, Button as JoyButton } from "@mui/joy";
3
- import { Box, Dialog, DialogActions, DialogTitle, Divider, List, ListItem, Tab, Tabs, Typography, } from "@mui/material";
2
+ import { Sheet } from "@mui/joy";
3
+ import { Box, Tab, Tabs } from "@mui/material";
4
4
  import { useEffect, useState } from "react";
5
5
  import { useHotkeys } from "react-hotkeys-hook";
6
6
  import { useTranslation } from "react-i18next";
7
7
  import { useDispatch, useSelector } from "react-redux";
8
- import { clearExistingLocations, customerAccessorialsSelector, debugOpenSelector, existingLocationsSelector, getHolidays, getQuoteAccessorials, holidaysSelector, quoteAccessorialsSelector, quoteBodySelector, quoteResponseSelector, runQuote, setDebugOpen, setLocationFormOpen, updateCellSelector, } from "../../redux";
9
- import { LocationForm } from "../locationsForm";
8
+ import { debugOpenSelector, quoteBodySelector, setDebugOpen, setQuoteErrors, setQuoteRunning, useLazyGetCustomerAccessorialsQuery, } from "../../redux";
9
+ import { useCreateQuoteMutation, useGetHolidaysQuery, useGetQuoteAccessorialsQuery, } from "../../redux/quote/quoteEndpoints";
10
+ import { quoteBodySchema } from "./constants";
10
11
  import { QuoteForm } from "./form";
11
12
  import { QuoteResult } from "./result";
12
13
  /**
13
14
  * Quote Main Component
14
15
  *
16
+ * @param {object} root0 Props
17
+ * @param {boolean} root0.customerPortal customerPortal
18
+ * @param {Function} root0.handleOnTenderLoadClick handleOnTenderLoadClick
15
19
  * @returns {ReactElement} quote form
16
20
  */
17
- export function QuoteTemplate({ customerPortal = false, }) {
21
+ export function QuoteTemplate({ customerPortal = false, handleOnTenderLoadClick, }) {
18
22
  const dispatch = useDispatch();
19
23
  const [showResponse, setShowResponse] = useState(false);
20
24
  const debugOpen = useSelector(debugOpenSelector);
21
- const quoteResponse = useSelector(quoteResponseSelector);
25
+ const { data: quoteResponse } = useCreateQuoteMutation({
26
+ fixedCacheKey: "quoteFormResult",
27
+ })[1];
28
+ const body = useSelector(quoteBodySelector);
29
+ const [newQuote] = useCreateQuoteMutation();
30
+ /**
31
+ *
32
+ */
33
+ function runQuote() {
34
+ let valid = true;
35
+ quoteBodySchema
36
+ .validate(body, {
37
+ abortEarly: false,
38
+ })
39
+ .catch(function (err) {
40
+ dispatch(setQuoteErrors(err.errors));
41
+ valid = false;
42
+ })
43
+ .then(async () => {
44
+ if (valid) {
45
+ dispatch(setQuoteErrors(undefined));
46
+ dispatch(setQuoteRunning(true));
47
+ newQuote(body);
48
+ }
49
+ });
50
+ }
22
51
  useHotkeys("ctrl + d", () => {
23
52
  dispatch(setDebugOpen(!debugOpen));
24
53
  }, {
25
54
  enableOnTags: ["INPUT", "SELECT", "TEXTAREA"],
26
55
  });
27
56
  useHotkeys("ctrl + x", () => {
28
- dispatch(runQuote());
57
+ runQuote();
29
58
  }, {
30
59
  enableOnTags: ["INPUT", "SELECT", "TEXTAREA"],
31
60
  });
32
- useEffect(() => {
33
- dispatch(getQuoteAccessorials());
34
- dispatch(getHolidays());
35
- }, []);
36
61
  useEffect(() => {
37
62
  if (quoteResponse && !showResponse) {
38
63
  setTimeout(() => setShowResponse(true), 500);
@@ -47,13 +72,13 @@ export function QuoteTemplate({ customerPortal = false, }) {
47
72
  position: "sticky",
48
73
  transition: "flex .5s ease-in-out",
49
74
  top: 48,
50
- }, children: showResponse ? _jsx(QuoteResult, {}) : [] }), debugOpen ? (_jsx(Box, { sx: {
75
+ }, children: showResponse ? (_jsx(QuoteResult, { handleOnTenderLoadClick: handleOnTenderLoadClick })) : ([]) }), debugOpen ? (_jsx(Box, { sx: {
51
76
  width: 300,
52
77
  height: "calc(100vh - 48px)",
53
78
  display: "flex",
54
79
  position: "sticky",
55
80
  top: 48,
56
- }, children: _jsx(Debugger, {}) })) : ([]), _jsx(ExistingLocations, {}), _jsx(LocationForm, {})] }));
81
+ }, children: _jsx(Debugger, {}) })) : ([])] }));
57
82
  }
58
83
  /**
59
84
  * Debugger. A drawer that displays the quote body object.
@@ -63,10 +88,17 @@ export function QuoteTemplate({ customerPortal = false, }) {
63
88
  function Debugger() {
64
89
  const [index, setIndex] = useState(0);
65
90
  const body = useSelector(quoteBodySelector);
66
- const quoteAccessorials = useSelector(quoteAccessorialsSelector);
67
- const customerAccessorials = useSelector(customerAccessorialsSelector);
68
- const response = useSelector(quoteResponseSelector);
69
- const holidays = useSelector(holidaysSelector);
91
+ const { data: quoteAccessorials } = useGetQuoteAccessorialsQuery();
92
+ const [getCustomerAccessorials, { data: customerAccessorials }] = useLazyGetCustomerAccessorialsQuery();
93
+ const { data: response } = useCreateQuoteMutation({
94
+ fixedCacheKey: "quoteFormResult",
95
+ })[1];
96
+ const { data: holidays } = useGetHolidaysQuery();
97
+ useEffect(() => {
98
+ if (body.customerId) {
99
+ getCustomerAccessorials(body.customerId, true);
100
+ }
101
+ }, [body.customerId]);
70
102
  const { t } = useTranslation("salesKit");
71
103
  const getCode = () => {
72
104
  switch (index) {
@@ -86,28 +118,4 @@ function Debugger() {
86
118
  };
87
119
  return (_jsxs(Sheet, { sx: { flex: 1, fontSize: 10, overflow: "scroll", color: "white" }, variant: "solid", children: [_jsxs(Tabs, { variant: "scrollable", textColor: "inherit", indicatorColor: "primary", onChange: (_e, v) => setIndex(v), value: index, sx: { color: "white" }, children: [_jsx(Tab, { sx: { color: "inherit", p: 0, m: 0 }, label: t("Body") }), _jsx(Tab, { sx: { color: "inherit", p: 0, m: 0 }, label: t("Quote Accessorials") }), _jsx(Tab, { sx: { color: "inherit", p: 0, m: 0 }, label: t("Customer Accessorials") }), _jsx(Tab, { sx: { color: "inherit", p: 0, m: 0 }, label: t("Holidays") }), _jsx(Tab, { sx: { color: "inherit", p: 0, m: 0 }, label: t("Response") })] }), _jsx(Box, { sx: { p: 1 }, children: _jsx("pre", { children: getCode() }) })] }));
88
120
  }
89
- /**
90
- * ExistingLocations
91
- *
92
- * @returns {ReactElement} show possible location matches
93
- */
94
- function ExistingLocations() {
95
- const { t } = useTranslation("salesKit");
96
- const existingLocations = useSelector(existingLocationsSelector);
97
- const updateCell = useSelector(updateCellSelector);
98
- const dispatch = useDispatch();
99
- if (!updateCell)
100
- return _jsx("div", {});
101
- return (_jsxs(Dialog, { open: existingLocations.length > 0, onClick: (e) => {
102
- e.preventDefault();
103
- e.stopPropagation();
104
- }, children: [_jsxs(DialogTitle, { children: [existingLocations.length, " ", existingLocations.length > 1
105
- ? t("facilities found for this address")
106
- : t("facility found for this address"), _jsx(Typography, { variant: "body2", children: t("Any chance this is what youre looking for?") })] }), _jsxs(List, { children: [_jsx(Divider, {}), existingLocations.map((c) => (_jsx(ListItem, { button: true, divider: true, onClick: () => {
107
- updateCell(c.id);
108
- dispatch(clearExistingLocations());
109
- }, children: _jsxs(Box, { children: [_jsx(Typography, { variant: "body2", color: "primary", children: c.name }), _jsx(Box, { sx: { display: "flex", gap: 1, alignItems: "center" }, children: _jsx(Typography, { variant: "caption", children: `${c.address.city}, ${c.address.state} ${c.address.zip}` }) })] }) }, c.id)))] }), _jsxs(DialogActions, { children: [_jsx(JoyButton, { onClick: () => {
110
- dispatch(clearExistingLocations());
111
- }, variant: "soft", color: "neutral", children: t("Cancel") }), _jsx(JoyButton, { onClick: () => dispatch(setLocationFormOpen(true)), variant: "soft", children: t("New Location") })] })] }));
112
- }
113
121
  //# sourceMappingURL=template.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"template.js","sourceRoot":"","sources":["../../../src/hooks/quote/template.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,EACL,GAAG,EACH,MAAM,EACN,aAAa,EACb,WAAW,EACX,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,GAAG,EACH,IAAI,EACJ,UAAU,GACX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EACL,sBAAsB,EACtB,4BAA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GACjC,EACF,KAAC,GAAG,IAAC,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,UAAU,CAAC,GAAI,EACnE,KAAC,GAAG,IAAC,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,UAAU,CAAC,GAAI,IAC9D,EACP,KAAC,GAAG,IAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,YACf,wBAAM,OAAO,EAAE,GAAO,GAClB,IACA,CACT,CAAC;AACJ,CAAC"}
@@ -0,0 +1,200 @@
1
+ import * as yup from "yup";
2
+ export declare const tenderBodyStep1: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
3
+ customerId: import("yup/lib/number").RequiredNumberSchema<number | undefined, import("yup/lib/types").AnyObject>;
4
+ referenceNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
5
+ }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
6
+ customerId: import("yup/lib/number").RequiredNumberSchema<number | undefined, import("yup/lib/types").AnyObject>;
7
+ referenceNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
8
+ }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
9
+ customerId: import("yup/lib/number").RequiredNumberSchema<number | undefined, import("yup/lib/types").AnyObject>;
10
+ referenceNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
11
+ }>>>;
12
+ export declare const tenderBodyStep2: yup.ObjectSchema<{
13
+ [x: string]: yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>;
14
+ } & {
15
+ customerId: import("yup/lib/number").RequiredNumberSchema<number | undefined, import("yup/lib/types").AnyObject>;
16
+ referenceNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
17
+ } & {
18
+ [x: string]: yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>;
19
+ } & {
20
+ tenderStops: yup.ArraySchema<import("yup/lib/object").OptionalObjectSchema<{
21
+ type: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
22
+ locationId: yup.NumberSchema<number | undefined, import("yup/lib/types").AnyObject, number | undefined>;
23
+ referenceNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
24
+ timeFrom: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
25
+ date: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
26
+ }, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<{
27
+ type: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
28
+ locationId: yup.NumberSchema<number | undefined, import("yup/lib/types").AnyObject, number | undefined>;
29
+ referenceNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
30
+ timeFrom: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
31
+ date: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
32
+ }>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<{
33
+ type: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
34
+ locationId: yup.NumberSchema<number | undefined, import("yup/lib/types").AnyObject, number | undefined>;
35
+ referenceNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
36
+ timeFrom: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
37
+ date: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
38
+ }>[] | undefined, import("yup/lib/object").AssertsShape<{
39
+ type: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
40
+ locationId: yup.NumberSchema<number | undefined, import("yup/lib/types").AnyObject, number | undefined>;
41
+ referenceNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
42
+ timeFrom: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
43
+ date: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
44
+ }>[] | undefined>;
45
+ }, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<{
46
+ [x: string]: yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>;
47
+ } & {
48
+ customerId: import("yup/lib/number").RequiredNumberSchema<number | undefined, import("yup/lib/types").AnyObject>;
49
+ referenceNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
50
+ } & {
51
+ [x: string]: yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>;
52
+ } & {
53
+ tenderStops: yup.ArraySchema<import("yup/lib/object").OptionalObjectSchema<{
54
+ type: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
55
+ locationId: yup.NumberSchema<number | undefined, import("yup/lib/types").AnyObject, number | undefined>;
56
+ referenceNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
57
+ timeFrom: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
58
+ date: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
59
+ }, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<{
60
+ type: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
61
+ locationId: yup.NumberSchema<number | undefined, import("yup/lib/types").AnyObject, number | undefined>;
62
+ referenceNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
63
+ timeFrom: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
64
+ date: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
65
+ }>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<{
66
+ type: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
67
+ locationId: yup.NumberSchema<number | undefined, import("yup/lib/types").AnyObject, number | undefined>;
68
+ referenceNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
69
+ timeFrom: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
70
+ date: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
71
+ }>[] | undefined, import("yup/lib/object").AssertsShape<{
72
+ type: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
73
+ locationId: yup.NumberSchema<number | undefined, import("yup/lib/types").AnyObject, number | undefined>;
74
+ referenceNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
75
+ timeFrom: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
76
+ date: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
77
+ }>[] | undefined>;
78
+ }>, import("yup/lib/object").AssertsShape<{
79
+ [x: string]: yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>;
80
+ } & {
81
+ customerId: import("yup/lib/number").RequiredNumberSchema<number | undefined, import("yup/lib/types").AnyObject>;
82
+ referenceNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
83
+ } & {
84
+ [x: string]: yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>;
85
+ } & {
86
+ tenderStops: yup.ArraySchema<import("yup/lib/object").OptionalObjectSchema<{
87
+ type: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
88
+ locationId: yup.NumberSchema<number | undefined, import("yup/lib/types").AnyObject, number | undefined>;
89
+ referenceNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
90
+ timeFrom: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
91
+ date: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
92
+ }, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<{
93
+ type: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
94
+ locationId: yup.NumberSchema<number | undefined, import("yup/lib/types").AnyObject, number | undefined>;
95
+ referenceNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
96
+ timeFrom: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
97
+ date: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
98
+ }>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<{
99
+ type: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
100
+ locationId: yup.NumberSchema<number | undefined, import("yup/lib/types").AnyObject, number | undefined>;
101
+ referenceNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
102
+ timeFrom: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
103
+ date: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
104
+ }>[] | undefined, import("yup/lib/object").AssertsShape<{
105
+ type: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
106
+ locationId: yup.NumberSchema<number | undefined, import("yup/lib/types").AnyObject, number | undefined>;
107
+ referenceNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
108
+ timeFrom: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
109
+ date: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
110
+ }>[] | undefined>;
111
+ }>>;
112
+ export declare const tenderBodyStep3: yup.ObjectSchema<{
113
+ [x: string]: yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>;
114
+ } & {
115
+ customerId: import("yup/lib/number").RequiredNumberSchema<number | undefined, import("yup/lib/types").AnyObject>;
116
+ referenceNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
117
+ } & {
118
+ [x: string]: yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>;
119
+ } & {
120
+ tenderStops: yup.ArraySchema<import("yup/lib/object").OptionalObjectSchema<{
121
+ locationId: import("yup/lib/number").RequiredNumberSchema<number | undefined, import("yup/lib/types").AnyObject>;
122
+ referenceNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
123
+ timeFrom: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
124
+ date: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
125
+ }, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<{
126
+ locationId: import("yup/lib/number").RequiredNumberSchema<number | undefined, import("yup/lib/types").AnyObject>;
127
+ referenceNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
128
+ timeFrom: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
129
+ date: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
130
+ }>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<{
131
+ locationId: import("yup/lib/number").RequiredNumberSchema<number | undefined, import("yup/lib/types").AnyObject>;
132
+ referenceNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
133
+ timeFrom: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
134
+ date: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
135
+ }>[] | undefined, import("yup/lib/object").AssertsShape<{
136
+ locationId: import("yup/lib/number").RequiredNumberSchema<number | undefined, import("yup/lib/types").AnyObject>;
137
+ referenceNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
138
+ timeFrom: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
139
+ date: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
140
+ }>[] | undefined>;
141
+ }, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<{
142
+ [x: string]: yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>;
143
+ } & {
144
+ customerId: import("yup/lib/number").RequiredNumberSchema<number | undefined, import("yup/lib/types").AnyObject>;
145
+ referenceNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
146
+ } & {
147
+ [x: string]: yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>;
148
+ } & {
149
+ tenderStops: yup.ArraySchema<import("yup/lib/object").OptionalObjectSchema<{
150
+ locationId: import("yup/lib/number").RequiredNumberSchema<number | undefined, import("yup/lib/types").AnyObject>;
151
+ referenceNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
152
+ timeFrom: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
153
+ date: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
154
+ }, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<{
155
+ locationId: import("yup/lib/number").RequiredNumberSchema<number | undefined, import("yup/lib/types").AnyObject>;
156
+ referenceNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
157
+ timeFrom: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
158
+ date: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
159
+ }>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<{
160
+ locationId: import("yup/lib/number").RequiredNumberSchema<number | undefined, import("yup/lib/types").AnyObject>;
161
+ referenceNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
162
+ timeFrom: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
163
+ date: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
164
+ }>[] | undefined, import("yup/lib/object").AssertsShape<{
165
+ locationId: import("yup/lib/number").RequiredNumberSchema<number | undefined, import("yup/lib/types").AnyObject>;
166
+ referenceNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
167
+ timeFrom: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
168
+ date: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
169
+ }>[] | undefined>;
170
+ }>, import("yup/lib/object").AssertsShape<{
171
+ [x: string]: yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>;
172
+ } & {
173
+ customerId: import("yup/lib/number").RequiredNumberSchema<number | undefined, import("yup/lib/types").AnyObject>;
174
+ referenceNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
175
+ } & {
176
+ [x: string]: yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>;
177
+ } & {
178
+ tenderStops: yup.ArraySchema<import("yup/lib/object").OptionalObjectSchema<{
179
+ locationId: import("yup/lib/number").RequiredNumberSchema<number | undefined, import("yup/lib/types").AnyObject>;
180
+ referenceNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
181
+ timeFrom: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
182
+ date: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
183
+ }, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<{
184
+ locationId: import("yup/lib/number").RequiredNumberSchema<number | undefined, import("yup/lib/types").AnyObject>;
185
+ referenceNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
186
+ timeFrom: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
187
+ date: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
188
+ }>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<{
189
+ locationId: import("yup/lib/number").RequiredNumberSchema<number | undefined, import("yup/lib/types").AnyObject>;
190
+ referenceNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
191
+ timeFrom: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
192
+ date: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
193
+ }>[] | undefined, import("yup/lib/object").AssertsShape<{
194
+ locationId: import("yup/lib/number").RequiredNumberSchema<number | undefined, import("yup/lib/types").AnyObject>;
195
+ referenceNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
196
+ timeFrom: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
197
+ date: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
198
+ }>[] | undefined>;
199
+ }>>;
200
+ export declare const documentDescriptions: string[];
@@ -0,0 +1,77 @@
1
+ import * as yup from "yup";
2
+ export const tenderBodyStep1 = yup.object().shape({
3
+ customerId: yup
4
+ .number()
5
+ .moreThan(0, "Select a customer")
6
+ .required("Select a customer"),
7
+ referenceNumber: yup.string().required("Pro number is required"),
8
+ });
9
+ export const tenderBodyStep2 = tenderBodyStep1.concat(yup.object().shape({
10
+ tenderStops: yup.array().of(yup.object({
11
+ type: yup.string(),
12
+ locationId: yup
13
+ .number()
14
+ .transform((value) => (isNaN(value) ? undefined : value))
15
+ .when("type", {
16
+ is: "shipper",
17
+ then: yup
18
+ .number()
19
+ .transform((value) => (isNaN(value) ? undefined : value))
20
+ .required("Facility is required"),
21
+ }),
22
+ referenceNumber: yup.string().when("type", {
23
+ is: "shipper",
24
+ then: yup.string().required("Reference number is required"),
25
+ }),
26
+ timeFrom: yup.string().when("type", {
27
+ is: "shipper",
28
+ then: yup.string().required("Appointment time is required"),
29
+ }),
30
+ date: yup.string().when("type", {
31
+ is: "shipper",
32
+ then: yup.string().required("Appointment date is required"),
33
+ }),
34
+ })),
35
+ }));
36
+ export const tenderBodyStep3 = tenderBodyStep1.concat(yup.object().shape({
37
+ tenderStops: yup.array().of(yup.object({
38
+ locationId: yup
39
+ .number()
40
+ .transform((value) => (isNaN(value) ? undefined : value))
41
+ .required("Facility is required"),
42
+ referenceNumber: yup.string().required("Reference number is required"),
43
+ timeFrom: yup.string().required("Appointment time is required"),
44
+ date: yup.string().when("dateFrom", {
45
+ is: undefined,
46
+ then: yup.string().required("Appointment date is required"),
47
+ otherwise: yup.string().when("dateTo", {
48
+ is: undefined,
49
+ then: yup.string().required("Appointment date is required"),
50
+ otherwise: yup.string(),
51
+ }),
52
+ }),
53
+ })),
54
+ }));
55
+ export const documentDescriptions = [
56
+ "Work Order",
57
+ "Rate Confirmation",
58
+ "PickUp Document",
59
+ "POD",
60
+ "Daily POD",
61
+ "Pending POD",
62
+ "Invoice",
63
+ "Revised Invoice",
64
+ "Accounting",
65
+ "Accessorial Confirmation Backup",
66
+ "Revised Load Tender Backup",
67
+ "Load Pictures",
68
+ "Packing List",
69
+ "Claims - Documents",
70
+ "Claims - Acknowledgement Letter",
71
+ "Claims - Denial Letter",
72
+ "Claims - Release Letter",
73
+ "Claims - Damage Pictures",
74
+ "Claims - Disposition Letter",
75
+ "Claims - Donation Letter",
76
+ ];
77
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/hooks/tender/constants.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAE3B,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC;IAChD,UAAU,EAAE,GAAG;SACZ,MAAM,EAAE;SACR,QAAQ,CAAC,CAAC,EAAE,mBAAmB,CAAC;SAChC,QAAQ,CAAC,mBAAmB,CAAC;IAChC,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;CACjE,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC,MAAM,CACnD,GAAG,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC;IACjB,WAAW,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,CACzB,GAAG,CAAC,MAAM,CAAC;QACT,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE;QAClB,UAAU,EAAE,GAAG;aACZ,MAAM,EAAE;aACR,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;aACxD,IAAI,CAAC,MAAM,EAAE;YACZ,EAAE,EAAE,SAAS;YACb,IAAI,EAAE,GAAG;iBACN,MAAM,EAAE;iBACR,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC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CAAC,IAAI,CAAC,UAAU,EAAE;YAClC,EAAE,EAAE,SAAS;YACb,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;YAC3D,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE;gBACrC,EAAE,EAAE,SAAS;gBACb,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;gBAC3D,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE;aACxB,CAAC;SACH,CAAC;KACH,CAAC,CACH;CACF,CAAC,CACH,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,YAAY;IACZ,mBAAmB;IACnB,iBAAiB;IACjB,KAAK;IACL,WAAW;IACX,aAAa;IACb,SAAS;IACT,iBAAiB;IACjB,YAAY;IACZ,iCAAiC;IACjC,4BAA4B;IAC5B,eAAe;IACf,cAAc;IACd,oBAAoB;IACpB,iCAAiC;IACjC,wBAAwB;IACxB,yBAAyB;IACzB,0BAA0B;IAC1B,6BAA6B;IAC7B,0BAA0B;CAC3B,CAAC"}
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ *
4
+ * @param {object} props Props
5
+ * @param {Function} props.newQuote New quote callback
6
+ * @returns {ReactElement} TenderForm
7
+ */
8
+ export declare function TenderForm(props: {
9
+ newQuote: () => void;
10
+ }): JSX.Element;