Skip to content

Commit fa20209

Browse files
authored
Merge pull request #1492 from CodeForAfrica/fix-opportunity-organisation
fix(trustlab): handle internal and external org links dynamically via CMS
2 parents 9352647 + ae28aaf commit fa20209

7 files changed

Lines changed: 192 additions & 64 deletions

File tree

apps/trustlab/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "trustlab",
3-
"version": "0.0.21",
3+
"version": "0.0.22",
44
"private": true,
55
"scripts": {
66
"dev": "next dev",

apps/trustlab/payload-types.ts

Lines changed: 128 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,14 @@ export interface Page {
490490
};
491491
[k: string]: unknown;
492492
};
493+
/**
494+
* Background color in hex format
495+
*/
496+
backgroundColor: string;
497+
/**
498+
* Text color in hex format
499+
*/
500+
textColor: string;
493501
card: {
494502
title: string;
495503
cardType?: ("items" | "richtext") | null;
@@ -1109,6 +1117,14 @@ export interface Page {
11091117
};
11101118
[k: string]: unknown;
11111119
} | null;
1120+
/**
1121+
* Background color in hex format
1122+
*/
1123+
backgroundColor: string;
1124+
/**
1125+
* Text color in hex format
1126+
*/
1127+
textColor: string;
11121128
opportunityType: "incubator" | "intelligence-briefing" | "baraza";
11131129
hasFilters?: boolean | null;
11141130
filterByLabel?: string | null;
@@ -1347,7 +1363,7 @@ export interface Page {
13471363
subtitle?: string | null;
13481364
variant: "chip" | "card";
13491365
/**
1350-
* Select organizations to display in this list
1366+
* Select organisations to display in this list
13511367
*/
13521368
organizations?: (string | Organisation)[] | null;
13531369
/**
@@ -1687,6 +1703,14 @@ export interface Page {
16871703
};
16881704
[k: string]: unknown;
16891705
};
1706+
/**
1707+
* Background color in hex format
1708+
*/
1709+
backgroundColor: string;
1710+
/**
1711+
* Text color in hex format
1712+
*/
1713+
textColor: string;
16901714
image: string | Media;
16911715
/**
16921716
* Logo or signature image displayed below the description
@@ -2104,6 +2128,14 @@ export interface Post {
21042128
};
21052129
[k: string]: unknown;
21062130
};
2131+
/**
2132+
* Background color in hex format
2133+
*/
2134+
backgroundColor: string;
2135+
/**
2136+
* Text color in hex format
2137+
*/
2138+
textColor: string;
21072139
card: {
21082140
title: string;
21092141
cardType?: ("items" | "richtext") | null;
@@ -2720,6 +2752,14 @@ export interface Post {
27202752
};
27212753
[k: string]: unknown;
27222754
} | null;
2755+
/**
2756+
* Background color in hex format
2757+
*/
2758+
backgroundColor: string;
2759+
/**
2760+
* Text color in hex format
2761+
*/
2762+
textColor: string;
27232763
opportunityType: "incubator" | "intelligence-briefing" | "baraza";
27242764
hasFilters?: boolean | null;
27252765
filterByLabel?: string | null;
@@ -2958,7 +2998,7 @@ export interface Post {
29582998
subtitle?: string | null;
29592999
variant: "chip" | "card";
29603000
/**
2961-
* Select organizations to display in this list
3001+
* Select organisations to display in this list
29623002
*/
29633003
organizations?: (string | Organisation)[] | null;
29643004
/**
@@ -3298,6 +3338,14 @@ export interface Post {
32983338
};
32993339
[k: string]: unknown;
33003340
};
3341+
/**
3342+
* Background color in hex format
3343+
*/
3344+
backgroundColor: string;
3345+
/**
3346+
* Text color in hex format
3347+
*/
3348+
textColor: string;
33013349
image: string | Media;
33023350
/**
33033351
* Logo or signature image displayed below the description
@@ -3468,16 +3516,15 @@ export interface Organisation {
34683516
[k: string]: unknown;
34693517
} | null;
34703518
image?: (string | null) | Media;
3471-
link: {
3472-
label: string;
3519+
includeLink: boolean;
3520+
link?: {
34733521
linkType?: ("custom" | "internal") | null;
34743522
doc?: {
34753523
relationTo: "pages";
34763524
value: string | Page;
34773525
} | null;
34783526
url?: string | null;
34793527
href: string;
3480-
newTab?: boolean | null;
34813528
};
34823529
blocks?:
34833530
| (
@@ -3707,6 +3754,14 @@ export interface Organisation {
37073754
};
37083755
[k: string]: unknown;
37093756
};
3757+
/**
3758+
* Background color in hex format
3759+
*/
3760+
backgroundColor: string;
3761+
/**
3762+
* Text color in hex format
3763+
*/
3764+
textColor: string;
37103765
card: {
37113766
title: string;
37123767
cardType?: ("items" | "richtext") | null;
@@ -4326,6 +4381,14 @@ export interface Organisation {
43264381
};
43274382
[k: string]: unknown;
43284383
} | null;
4384+
/**
4385+
* Background color in hex format
4386+
*/
4387+
backgroundColor: string;
4388+
/**
4389+
* Text color in hex format
4390+
*/
4391+
textColor: string;
43294392
opportunityType: "incubator" | "intelligence-briefing" | "baraza";
43304393
hasFilters?: boolean | null;
43314394
filterByLabel?: string | null;
@@ -4564,7 +4627,7 @@ export interface Organisation {
45644627
subtitle?: string | null;
45654628
variant: "chip" | "card";
45664629
/**
4567-
* Select organizations to display in this list
4630+
* Select organisations to display in this list
45684631
*/
45694632
organizations?: (string | Organisation)[] | null;
45704633
/**
@@ -4904,6 +4967,14 @@ export interface Organisation {
49044967
};
49054968
[k: string]: unknown;
49064969
};
4970+
/**
4971+
* Background color in hex format
4972+
*/
4973+
backgroundColor: string;
4974+
/**
4975+
* Text color in hex format
4976+
*/
4977+
textColor: string;
49074978
image: string | Media;
49084979
/**
49094980
* Logo or signature image displayed below the description
@@ -5012,7 +5083,7 @@ export interface Organisation {
50125083
}
50135084
)[]
50145085
| null;
5015-
slug?: string | null;
5086+
slug: string;
50165087
updatedAt: string;
50175088
createdAt: string;
50185089
}
@@ -5439,6 +5510,14 @@ export interface Opportunity {
54395510
};
54405511
[k: string]: unknown;
54415512
};
5513+
/**
5514+
* Background color in hex format
5515+
*/
5516+
backgroundColor: string;
5517+
/**
5518+
* Text color in hex format
5519+
*/
5520+
textColor: string;
54425521
card: {
54435522
title: string;
54445523
cardType?: ("items" | "richtext") | null;
@@ -6058,6 +6137,14 @@ export interface Opportunity {
60586137
};
60596138
[k: string]: unknown;
60606139
} | null;
6140+
/**
6141+
* Background color in hex format
6142+
*/
6143+
backgroundColor: string;
6144+
/**
6145+
* Text color in hex format
6146+
*/
6147+
textColor: string;
60616148
opportunityType: "incubator" | "intelligence-briefing" | "baraza";
60626149
hasFilters?: boolean | null;
60636150
filterByLabel?: string | null;
@@ -6296,7 +6383,7 @@ export interface Opportunity {
62966383
subtitle?: string | null;
62976384
variant: "chip" | "card";
62986385
/**
6299-
* Select organizations to display in this list
6386+
* Select organisations to display in this list
63006387
*/
63016388
organizations?: (string | Organisation)[] | null;
63026389
/**
@@ -6636,6 +6723,14 @@ export interface Opportunity {
66366723
};
66376724
[k: string]: unknown;
66386725
};
6726+
/**
6727+
* Background color in hex format
6728+
*/
6729+
backgroundColor: string;
6730+
/**
6731+
* Text color in hex format
6732+
*/
6733+
textColor: string;
66396734
image: string | Media;
66406735
/**
66416736
* Logo or signature image displayed below the description
@@ -7061,6 +7156,8 @@ export interface PagesSelect<T extends boolean = true> {
70617156
| {
70627157
title?: T;
70637158
content?: T;
7159+
backgroundColor?: T;
7160+
textColor?: T;
70647161
card?:
70657162
| T
70667163
| {
@@ -7356,6 +7453,8 @@ export interface PagesSelect<T extends boolean = true> {
73567453
| {
73577454
title?: T;
73587455
description?: T;
7456+
backgroundColor?: T;
7457+
textColor?: T;
73597458
opportunityType?: T;
73607459
hasFilters?: T;
73617460
filterByLabel?: T;
@@ -7672,6 +7771,8 @@ export interface PagesSelect<T extends boolean = true> {
76727771
| {
76737772
title?: T;
76747773
description?: T;
7774+
backgroundColor?: T;
7775+
textColor?: T;
76757776
image?: T;
76767777
signatureIcon?: T;
76777778
id?: T;
@@ -7837,6 +7938,8 @@ export interface PostsSelect<T extends boolean = true> {
78377938
| {
78387939
title?: T;
78397940
content?: T;
7941+
backgroundColor?: T;
7942+
textColor?: T;
78407943
card?:
78417944
| T
78427945
| {
@@ -8132,6 +8235,8 @@ export interface PostsSelect<T extends boolean = true> {
81328235
| {
81338236
title?: T;
81348237
description?: T;
8238+
backgroundColor?: T;
8239+
textColor?: T;
81358240
opportunityType?: T;
81368241
hasFilters?: T;
81378242
filterByLabel?: T;
@@ -8448,6 +8553,8 @@ export interface PostsSelect<T extends boolean = true> {
84488553
| {
84498554
title?: T;
84508555
description?: T;
8556+
backgroundColor?: T;
8557+
textColor?: T;
84518558
image?: T;
84528559
signatureIcon?: T;
84538560
id?: T;
@@ -8576,15 +8683,14 @@ export interface OrganisationsSelect<T extends boolean = true> {
85768683
name?: T;
85778684
description?: T;
85788685
image?: T;
8686+
includeLink?: T;
85798687
link?:
85808688
| T
85818689
| {
8582-
label?: T;
85838690
linkType?: T;
85848691
doc?: T;
85858692
url?: T;
85868693
href?: T;
8587-
newTab?: T;
85888694
};
85898695
blocks?:
85908696
| T
@@ -8676,6 +8782,8 @@ export interface OrganisationsSelect<T extends boolean = true> {
86768782
| {
86778783
title?: T;
86788784
content?: T;
8785+
backgroundColor?: T;
8786+
textColor?: T;
86798787
card?:
86808788
| T
86818789
| {
@@ -8971,6 +9079,8 @@ export interface OrganisationsSelect<T extends boolean = true> {
89719079
| {
89729080
title?: T;
89739081
description?: T;
9082+
backgroundColor?: T;
9083+
textColor?: T;
89749084
opportunityType?: T;
89759085
hasFilters?: T;
89769086
filterByLabel?: T;
@@ -9287,6 +9397,8 @@ export interface OrganisationsSelect<T extends boolean = true> {
92879397
| {
92889398
title?: T;
92899399
description?: T;
9400+
backgroundColor?: T;
9401+
textColor?: T;
92909402
image?: T;
92919403
signatureIcon?: T;
92929404
id?: T;
@@ -9541,6 +9653,8 @@ export interface OpportunitiesSelect<T extends boolean = true> {
95419653
| {
95429654
title?: T;
95439655
content?: T;
9656+
backgroundColor?: T;
9657+
textColor?: T;
95449658
card?:
95459659
| T
95469660
| {
@@ -9836,6 +9950,8 @@ export interface OpportunitiesSelect<T extends boolean = true> {
98369950
| {
98379951
title?: T;
98389952
description?: T;
9953+
backgroundColor?: T;
9954+
textColor?: T;
98399955
opportunityType?: T;
98409956
hasFilters?: T;
98419957
filterByLabel?: T;
@@ -10152,6 +10268,8 @@ export interface OpportunitiesSelect<T extends boolean = true> {
1015210268
| {
1015310269
title?: T;
1015410270
description?: T;
10271+
backgroundColor?: T;
10272+
textColor?: T;
1015510273
image?: T;
1015610274
signatureIcon?: T;
1015710275
id?: T;

0 commit comments

Comments
 (0)