Skip to content

Commit 094877f

Browse files
author
himaniraghav3
committed
Add start date
1 parent 72c5744 commit 094877f

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

src/apps/admin/src/lib/models/MobileTableColumn.model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
import { TableColumn } from '~/libs/ui'
55

66
export interface MobileTableColumn<T> extends TableColumn<T> {
7-
readonly mobileType?: 'label'
7+
readonly mobileType?: 'label' | 'last-value'
88
}

src/apps/copilots/src/copilots.routes.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,19 @@ export const childRoutes = [
2323
route: '/',
2424
},
2525
{
26+
authRequired: true,
2627
element: <CopilotsRequests />,
2728
id: 'CopilotRequests',
2829
route: '/requests',
2930
},
3031
{
32+
authRequired: true,
3133
element: <CopilotsRequestForm />,
3234
id: 'CopilotRequestForm',
3335
route: '/requests/new',
3436
},
3537
{
38+
authRequired: true,
3639
element: <CopilotsRequests />,
3740
id: 'CopilotRequestDetails',
3841
route: '/requests/:requestId',
@@ -54,10 +57,8 @@ export const copilotRoutesMap = childRoutes.reduce((allRoutes, route) => (
5457

5558
export const copilotsRoutes: ReadonlyArray<PlatformRoute> = [
5659
{
57-
authRequired: true,
5860
children: [
5961
...childRoutes,
60-
6162
],
6263
domain: AppSubdomain.copilots,
6364
element: <CopilotsApp />,

src/apps/copilots/src/pages/copilot-opportunity-details/index.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { FC, useEffect, useState } from 'react'
22
import { useNavigate, useParams } from 'react-router-dom'
3+
import moment from 'moment'
34

45
import {
56
ContentLayout,
@@ -29,7 +30,7 @@ const CopilotOpportunityDetails: FC<{}> = () => {
2930
if (!opportunity) {
3031
setShowNotFound(true)
3132
}
32-
}, 2000)
33+
}, 5000)
3334

3435
return () => clearTimeout(timer) // Cleanup on unmount
3536
}, [opportunity])
@@ -60,6 +61,17 @@ const CopilotOpportunityDetails: FC<{}> = () => {
6061
<span className={styles.infoValue}>{opportunity?.status}</span>
6162
</div>
6263
</div>
64+
<div className={styles.infoColumn}>
65+
<IconOutline.PlayIcon className={styles.icon} />
66+
<div className={styles.infoText}>
67+
<span className={styles.infoHeading}>Start Date</span>
68+
<span className={styles.infoValue}>
69+
{moment(opportunity?.startDate)
70+
.format('MMM D, YYYY')}
71+
72+
</span>
73+
</div>
74+
</div>
6375
<div className={styles.infoColumn}>
6476
<IconOutline.CalendarIcon className={styles.icon} />
6577
<div className={styles.infoText}>

src/apps/copilots/src/services/copilot-opportunities.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export type CopilotOpportunityResponse = SWRResponse<CopilotOpportunity, Copilot
7171
* @returns {CopilotOpportunityResponse} - The response containing the copilot request data.
7272
*/
7373
export const useCopilotOpportunity = (opportunityId?: string): CopilotOpportunityResponse => {
74-
const url = opportunityId ? buildUrl(`${baseUrl}/copilots/opportunities/${opportunityId}`) : undefined
74+
const url = opportunityId ? buildUrl(`${baseUrl}/copilot/opportunity/${opportunityId}`) : undefined
7575

7676
const fetcher = (urlp: string): Promise<CopilotOpportunity> => xhrGetAsync<CopilotOpportunity>(urlp)
7777
.then(copilotOpportunityFactory)

0 commit comments

Comments
 (0)