Skip to content

Commit 35569df

Browse files
Merge pull request #93 from cortex-reply/beta
feat: new intranet components
2 parents 4a04739 + 5c0be83 commit 35569df

61 files changed

Lines changed: 57589 additions & 256 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@
130130
"clsx": "^2.1.1",
131131
"cmdk": "^1.0.4",
132132
"date-fns": "^4.1.0",
133+
"embla-carousel-autoplay": "^8.6.0",
134+
"embla-carousel-react": "^8.6.0",
133135
"formik": "^2.4.6",
134136
"html2canvas": "^1.4.1",
135137
"jspdf": "^2.5.2",

pnpm-lock.yaml

Lines changed: 40 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/Cards/EventCard.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ export function EventCard({
3939
const getEventColor = (eventType: EventType) => {
4040
switch (eventType) {
4141
case 'birthday':
42-
return 'bg-brand-one'
42+
return 'bg-brand-cyan'
4343
case 'workAnniversary':
44-
return 'bg-brand-two'
44+
return 'bg-brand-blue'
4545
case 'companyEvent':
46-
return 'bg-brand-three'
46+
return 'bg-brand-plum'
4747
default:
4848
return 'from-gray-500 to-slate-500'
4949
}

src/components/DeliveryLead/DeliveryLeadSubmission.stories.tsx

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,79 @@ const exampleCustomerProjectPairs = [
2929
{ customer: { id: 3, name: 'Initech' }, project: { id: 301, name: 'API Integration' } },
3030
]
3131

32+
const prefilledSubmission = {
33+
customer: 1,
34+
project: 101,
35+
projectSummary: 'Existing project summary',
36+
projectUpdate: 'Latest updates go here',
37+
projectConcerns: 'Escalate dependency on vendor',
38+
commercialOpportunities: 'Upsell managed services',
39+
commercialRisks: 'Budget freeze risk',
40+
milestones: [
41+
{
42+
name: 'milestone 1',
43+
commentary: 'Kick-off completed',
44+
dueDate: '2026-01-01T12:00:00.000Z',
45+
rag: 'At Risk',
46+
},
47+
{
48+
name: 'milestone 2',
49+
commentary: 'Launch planned',
50+
rag: 'Complete',
51+
},
52+
],
53+
}
54+
55+
const payloadLikeInitialData = {
56+
id: 1,
57+
user: {
58+
id: 1,
59+
name: 'Test user - do not delete',
60+
email: 'test@test.com',
61+
holidaysRemaining: 25,
62+
startingHolidays: 25,
63+
},
64+
customer: {
65+
id: 55,
66+
name: 'Payload Customer',
67+
active: true,
68+
},
69+
project: {
70+
id: 77,
71+
projectName: 'Prefilled Project',
72+
customer: {
73+
id: 55,
74+
name: 'Payload Customer',
75+
},
76+
deliveryLead: 1,
77+
projectSummary: 'Embedded project summary from payload',
78+
updatedAt: '2025-12-29T17:01:42.242Z',
79+
createdAt: '2025-12-29T17:01:02.257Z',
80+
},
81+
projectSummary: 'Prefilled summary from payload object',
82+
milestones: [
83+
{
84+
id: '6952b833837af7823a9d9f73',
85+
name: 'milestone 1',
86+
commentary: 'Kick-off complete',
87+
dueDate: '2026-01-01T12:00:00.000Z',
88+
rag: 'At Risk',
89+
},
90+
{
91+
id: '6952b85a837af7823a9d9f75',
92+
name: 'milestone 2',
93+
commentary: 'Rollout planned',
94+
rag: 'Complete',
95+
},
96+
],
97+
projectUpdate: 'Prefilled update text',
98+
projectConcerns: null,
99+
commercialOpportunities: null,
100+
commercialRisks: null,
101+
updatedAt: '2025-12-29T17:20:48.305Z',
102+
createdAt: '2025-12-29T17:20:08.051Z',
103+
}
104+
32105
export const Default: Story = {
33106
args: {
34107
customerProjectPairs: exampleCustomerProjectPairs,
@@ -40,4 +113,24 @@ export const NoCustomers: Story = {
40113
args: {
41114
// customerProjectPairs: exampleCustomerProjectPairs,
42115
},
116+
}
117+
118+
export const PrefilledValues: Story = {
119+
args: {
120+
customerProjectPairs: exampleCustomerProjectPairs,
121+
initialData: prefilledSubmission,
122+
},
123+
}
124+
125+
export const PrefilledFromPayloadObjects: Story = {
126+
args: {
127+
customerProjectPairs: exampleCustomerProjectPairs,
128+
initialData: payloadLikeInitialData,
129+
},
130+
}
131+
132+
export const PrefilledWithoutPairs: Story = {
133+
args: {
134+
initialData: payloadLikeInitialData,
135+
},
43136
}

0 commit comments

Comments
 (0)