Skip to content

Commit 218b919

Browse files
committed
feat(resources): Added resources listing and edit add form
1 parent e017696 commit 218b919

File tree

14 files changed

+539
-10
lines changed

14 files changed

+539
-10
lines changed

app/root/config/routes.tsx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,27 @@ const users: RouteConfig = {
251251
visibility: 'is-authenticated',
252252
};
253253

254+
const resources: RouteConfig = {
255+
index: true,
256+
path: 'resources',
257+
load: () => import('#views/Resources/ResourcesList'),
258+
visibility: 'is-authenticated',
259+
};
260+
261+
const editResources: RouteConfig = {
262+
index: true,
263+
path: 'resources/:id/edit',
264+
load: () => import('#views/Resources/ResourcesForm'),
265+
visibility: 'is-authenticated',
266+
};
267+
268+
const addResources: RouteConfig = {
269+
index: true,
270+
path: 'resources/add',
271+
load: () => import('#views/Resources/ResourcesForm'),
272+
visibility: 'is-authenticated',
273+
};
274+
254275
const routes = {
255276
login,
256277
home,
@@ -288,6 +309,9 @@ const routes = {
288309
editStrategicDirectives,
289310
strategicDirectives,
290311
users,
312+
resources,
313+
addResources,
314+
editResources,
291315
};
292316

293317
export type RouteKeys = keyof typeof routes;

app/views/FAQs/FAQsForm/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ function FAQsForm() {
139139
return (
140140
<Page>
141141
<ContainerWrapper>
142-
<FormSection headingLevel={3} label="FAQs DETAIL" />
142+
<FormSection headingLevel={3} label={id ? 'FAQs DETAIL' : 'CREATE FAQ'} />
143143
<Activity mode={value.createdBy && value.modifiedBy ? 'visible' : 'hidden'}>
144144
<FormSection>
145145
<Heading level={6}>

app/views/Highlight/HighlightForm/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ function HighlightForm() {
306306
return (
307307
<Page>
308308
<ContainerWrapper>
309-
<FormSection headingLevel={3} label="FAQS DETAIL" />
309+
<FormSection headingLevel={3} label={id ? 'HIGHLIGHT DETAILS' : 'CREATE HIGHLIGHT'} />
310310
<Activity mode={value.createdBy && value.modifiedBy ? 'visible' : 'hidden'}>
311311
<FormSection>
312312
<Heading level={6}>

app/views/News/NewsForm/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ function NewsForm() {
195195
return (
196196
<Page>
197197
<ContainerWrapper>
198-
<FormSection headingLevel={3} label="NEWS DETAILS" />
198+
<FormSection headingLevel={3} label={id ? 'NEWS DETAILS' : 'CREATE NEWS'} />
199199
<Activity mode={value.createdBy && value.modifiedBy ? 'visible' : 'hidden'}>
200200
<FormSection>
201201
<Heading level={6}>

app/views/Partner/PartnerForm/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ function PartnerForm() {
153153
return (
154154
<Page>
155155
<ContainerWrapper>
156-
<FormSection headingLevel={3} label="PARTNER DETAILS" />
156+
<FormSection headingLevel={3} label={id ? 'PARTNER DETAILS' : 'CREATE PARTNER'} />
157157
<Activity mode={value.createdBy && value.modifiedBy ? 'visible' : 'hidden'}>
158158
<FormSection>
159159
<Heading level={6}>
@@ -178,7 +178,7 @@ function PartnerForm() {
178178
autoFocus
179179
/>
180180
</FormSection>
181-
<FormSection label="Status" description="Add status to either global or local" withAsteriskOnTitle>
181+
<FormSection label="Scope" description="Add scope to either global or local" withAsteriskOnTitle>
182182
<SelectInput
183183
name="scope"
184184
options={scopeOptions}

app/views/PrivateLayout/index.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ const navigation = [
7474
title: 'Radio Programs',
7575
variant: 'leaf' as const,
7676

77+
},
78+
{
79+
to: '/resources',
80+
title: 'Resources',
81+
variant: 'leaf' as const,
82+
7783
},
7884
{
7985
to: '/strategic-directive',

app/views/Procurement/ProcurementForm/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ function ProcurementForm() {
159159
return (
160160
<Page>
161161
<ContainerWrapper>
162-
<FormSection headingLevel={3} label="PROCUREMENT DETAILS" />
162+
<FormSection headingLevel={3} label={id ? 'PROCUREMENT DETAILS' : 'CREATE PROCUREMENT'} />
163163
<Activity mode={value.createdBy && value.modifiedBy ? 'visible' : 'hidden'}>
164164
<FormSection>
165165
<Heading level={6}>

app/views/Project/ProjectForm/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ function ProjectForm() {
160160
return (
161161
<Page>
162162
<ContainerWrapper>
163-
<FormSection headingLevel={3} label="VACANCY DETAILS" />
163+
<FormSection headingLevel={3} label={id ? 'PROJECT DETAILS' : 'CREATE PROJECT'} />
164164
<Activity mode={value.createdBy && value.modifiedBy ? 'visible' : 'hidden'}>
165165
<FormSection>
166166
<Heading level={6}>

app/views/RadioProgram/RadioProgramForm/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ function RadioProgramForm() {
166166
return (
167167
<Page>
168168
<ContainerWrapper>
169-
<FormSection headingLevel={3} label="RADIO PROGRAM DETAILS" />
169+
<FormSection headingLevel={3} label={id ? 'RADIO PROGRAM DETAILS' : 'CREATE RADIO PROGRAM'} />
170170
<Activity mode={value.createdBy && value.modifiedBy ? 'visible' : 'hidden'}>
171171
<FormSection>
172172
<Heading level={6}>

0 commit comments

Comments
 (0)