@workwell-global/component-library 1.1.32 → 1.1.33

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.
@@ -1,12 +1,26 @@
1
1
  import { z } from 'zod'
2
2
  import { createEntityToolkit } from '../helpers/EntityToolkit'
3
3
 
4
+ export const solutionKeyMap = {
5
+ ww_scats_parent_aor: 'AOR',
6
+ ww_scats_parent_eor: 'EOR',
7
+ ww_scats_ctc_full_ser: 'C2CFullService',
8
+ ww_scats_ltdco: 'C2CNoAccount',
9
+ ww_scats_selfemployed: 'SEFullService',
10
+ ww_scats_selfemployed_noaccnt: 'SENoAccount',
11
+ ww_scats_sla: 'SLA',
12
+ ww_scats_employed: 'ICP',
13
+ ww_scats_mpp: 'MPP',
14
+ ww_scats_cpaye: 'PAYE',
15
+ ww_scats_ppaye: 'PremiumAFunding',
16
+ ww_scats_premium_b: 'PremiumBERObligations',
17
+ ww_scats_eor: 'Salaried',
18
+ }
19
+
4
20
  export const solutionFields = {
5
21
  productid: { pretty: 'productId', type: z.string().nullish() },
6
22
  name: { pretty: 'name', type: z.string().nullish() },
7
- productnumber: { pretty: 'solutionKey', type: z.string().nullish() },
8
- //we are adding this so it doesnt complain when we differentiate between solution and type key
9
- solutionTypeKey: { pretty: 'solutionTypeKey', type: z.string().nullish() },
23
+ productnumber: { pretty: 'productNumber', type: z.string().nullish() },
10
24
  description: { pretty: 'description', type: z.string().nullish() },
11
25
 
12
26
  ww_locationcode: { pretty: 'locationCode', type: z.string().nullish() },
@@ -3,7 +3,8 @@ import { EnquiryToolkit } from '../../api/SEnquiryAPI'
3
3
 
4
4
  export const SGetEnquiriesSummaryBFF = EnquiryToolkit.SResponseAPI.pick({
5
5
  createdOn: true,
6
- disqualificationReason: true,
6
+ disqualificationReasonValue: true,
7
+ disqualificationDetailReasonValue: true,
7
8
  enquiryFriendlyName: true,
8
9
  enquiryId: true,
9
10
  enquiryStatus: true,
@@ -8,11 +8,17 @@ import { SWorkCountryBFF } from './SGetEnquirySimWorkCountryBFF'
8
8
 
9
9
  export const SGetEnquirySimBFF = SimulationToolkit.SResponseAPI.pick({
10
10
  simulationFriendlyId: true,
11
- simulationName: true,
11
+ simulationId: true,
12
12
  simulationStatus: true,
13
+ simulationBasedOn: true,
14
+ solutionValue: true,
15
+ solutionTypeValue: true,
16
+ jobTitle: true,
17
+ jobDescription: true,
13
18
  rate: true,
14
19
  rateFrequency: true,
15
- simulationId: true,
20
+ estimatedConfirmedStartDate: true,
21
+ estimatedConfirmedEndDate: true,
16
22
  }).extend({
17
23
  workCountry: SWorkCountryBFF,
18
24
  currency: SCurrencyBFF,
@@ -1,10 +1,30 @@
1
1
  import { z } from 'zod'
2
2
  import { SolutionToolkit } from '../../api/SSolutionAPI'
3
3
 
4
+ const solutionKeyMap = {
5
+ ww_scats_parent_aor: 'AOR',
6
+ ww_scats_parent_eor: 'EOR',
7
+ ww_scats_ctc_full_ser: 'C2CFullService',
8
+ ww_scats_ltdco: 'C2CNoAccount',
9
+ ww_scats_selfemployed: 'SEFullService',
10
+ ww_scats_selfemployed_noaccnt: 'SENoAccount',
11
+ ww_scats_sla: 'SLA',
12
+ ww_scats_employed: 'ICP',
13
+ ww_scats_mpp: 'MPP',
14
+ ww_scats_cpaye: 'PAYE',
15
+ ww_scats_ppaye: 'PremiumAFunding',
16
+ ww_scats_premium_b: 'PremiumBERObligations',
17
+ ww_scats_eor: 'Salaried',
18
+ }
19
+ //as there is only 1 - use transform to flatten
20
+ //also map above
4
21
  export const SSolutionBFF = SolutionToolkit.SResponseAPI.pick({
5
- solutionKey: true,
22
+ productNumber: true,
6
23
  })
7
- .transform(val => val.solutionKey)
24
+ .transform(val => {
25
+ const pn = val.productNumber
26
+ return solutionKeyMap[pn as keyof typeof solutionKeyMap] || pn
27
+ })
8
28
  .nullish()
9
29
 
10
30
  export type TGetEnquirySimSolutionBFF = z.infer<typeof SSolutionBFF>
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod'
2
2
  import { CountryToolkit } from '../../api/SCountryApi'
3
3
 
4
+ //as there is only 1 - use transform to flatten
4
5
  export const SWorkCountryBFF = CountryToolkit.SResponseAPI.pick({
5
6
  code: true,
6
7
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workwell-global/component-library",
3
- "version": "1.1.32",
3
+ "version": "1.1.33",
4
4
  "description": "A component library for Workwell",
5
5
  "license": "MIT",
6
6
  "main": "dist/cjs",
@@ -1,10 +0,0 @@
1
- import { z } from 'zod'
2
- import { SolutionToolkit } from '../../api/SSolutionAPI'
3
-
4
- export const SSolutionTypeBFF = SolutionToolkit.SResponseAPI.pick({
5
- solutionTypeKey: true,
6
- })
7
- .transform(val => val.solutionTypeKey)
8
- .nullish()
9
-
10
- export type TGetEnquirySimSolutionTypeBFF = z.infer<typeof SSolutionTypeBFF>