Skip to content

Commit d70b107

Browse files
committed
Merge branch 'develop'
2 parents 73b7b73 + f746ade commit d70b107

File tree

6 files changed

+58
-47
lines changed

6 files changed

+58
-47
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { Prompt } from '../../prompts/dto';
2+
3+
export const prompts = [
4+
Prompt.create({
5+
id: 'bnrqZXOtEeW',
6+
text: 'What are some responses you have seen in the community? Think of community outreach, youth camps, and other community events related to this project. (Ex: increased unity, freedom from false religions, less violence, etc.)',
7+
shortLabel: 'What are some responses you have seen in the community?',
8+
}),
9+
Prompt.create({
10+
id: 'Bn3zwnzb3JN',
11+
text: 'How was the translated Scripture used among the churches, local ministries, or other groups in the last quarter?',
12+
shortLabel: 'How was the translated Scripture used?',
13+
}),
14+
Prompt.create({
15+
id: 'MsdfnoZkYda',
16+
text: 'Share a specific example of how translated Scripture changed or challenged the way one person viewed themselves, others, and/or God. (Ex: in marriage, parenting, family life, personal growth, friendships, relationship with God, etc.)',
17+
shortLabel:
18+
'Share a specific example of how translated Scripture changed a person?',
19+
}),
20+
Prompt.create({
21+
id: 'P4FO95xsZ7A',
22+
text: 'Tell how someone responded to the Scripture in a checking session. Was there a passage that was meaningful to this specific person? If yes, what did they discover?',
23+
shortLabel:
24+
'Tell how someone responded to the Scripture in a checking session.',
25+
}),
26+
];

src/components/progress-report/community-stories/progress-report-community-story.service.ts

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { Prompt } from '../../prompts/dto';
88
import { PromptVariantResponseListService } from '../../prompts/prompt-variant-response.service';
99
import { ProgressReport } from '../dto';
1010
import { ProgressReportCommunityStory as CommunityStory } from '../dto/community-stories.dto';
11+
import { prompts } from './community-story-prompts';
1112
import { ProgressReportCommunityStoryRepository } from './progress-report-community-story.repository';
1213

1314
@Injectable()
@@ -28,22 +29,3 @@ export class ProgressReportCommunityStoryService extends PromptVariantResponseLi
2829
);
2930
}
3031
}
31-
32-
const prompts = [
33-
Prompt.create({
34-
id: 'bnrqZXOtEeW',
35-
text: 'What are some responses you have seen in the community? Think of community outreach, youth camps, and other community events related to this project. (Ex: increased unity, freedom from false religions, less violence, etc.)',
36-
}),
37-
Prompt.create({
38-
id: 'Bn3zwnzb3JN',
39-
text: 'How was the translated Scripture used among the churches, local ministries, or other groups in the last quarter?',
40-
}),
41-
Prompt.create({
42-
id: 'MsdfnoZkYda',
43-
text: 'Share a specific example of how translated Scripture changed or challenged the way one person viewed themselves, others, and/or God. (Ex: in marriage, parenting, family life, personal growth, friendships, relationship with God, etc.)',
44-
}),
45-
Prompt.create({
46-
id: 'P4FO95xsZ7A',
47-
text: 'Tell how someone responded to the Scripture in a checking session. Was there a passage that was meaningful to this specific person? If yes, what did they discover?',
48-
}),
49-
];

src/components/progress-report/highlights/progress-report-highlights.service.ts

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class ProgressReportHighlightsService extends PromptVariantResponseListSe
1515
ProgressReportHighlightsRepository,
1616
) {
1717
protected async getPrompts(): Promise<readonly Prompt[]> {
18-
return prompts;
18+
return [];
1919
}
2020

2121
protected async getPrivilegeContext(dto: UnsecuredDto<Highlight>) {
@@ -28,22 +28,3 @@ export class ProgressReportHighlightsService extends PromptVariantResponseListSe
2828
);
2929
}
3030
}
31-
32-
const prompts = [
33-
Prompt.create({
34-
id: 'B3HOymZDiwi',
35-
text: 'What are the biggest obstacles team members are facing in reaching their goals? How are they dealing with those obstacles? (Ex: translation difficulties, political unrest, suppression of faith)',
36-
}),
37-
Prompt.create({
38-
id: '3rLRHtQKsyy',
39-
text: 'What terms or concepts were difficult to find the right word for in the local language? Please explain how you found a solution.',
40-
}),
41-
Prompt.create({
42-
id: 'zsuBZUOwy3b',
43-
text: 'How has working on the translation affected team members or their families? Please give a specific example.',
44-
}),
45-
Prompt.create({
46-
id: '1uzkzNwBRk3',
47-
text: 'What are the biggest obstacles team members are facing in reaching their goals? How are they dealing with those obstacles? (Ex: translation difficulties, political unrest, suppression of faith)',
48-
}),
49-
];

src/components/progress-report/team-news/progress-report-team-news.service.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { PromptVariantResponseListService } from '../../prompts/prompt-variant-r
99
import { ProgressReport } from '../dto';
1010
import { ProgressReportTeamNews as TeamNews } from '../dto/team-news.dto';
1111
import { ProgressReportTeamNewsRepository } from './progress-report-team-news.repository';
12+
import { prompts } from './team-news-prompts';
1213

1314
@Injectable()
1415
export class ProgressReportTeamNewsService extends PromptVariantResponseListService(
@@ -28,10 +29,3 @@ export class ProgressReportTeamNewsService extends PromptVariantResponseListServ
2829
);
2930
}
3031
}
31-
32-
const prompts = [
33-
Prompt.create({
34-
id: 'F4eY7VXhPpM',
35-
text: 'News?',
36-
}),
37-
];
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { Prompt } from '../../prompts/dto';
2+
3+
export const prompts = [
4+
Prompt.create({
5+
id: 'F4eY7VXhPpM',
6+
text: 'News?',
7+
shortLabel: 'News?',
8+
}),
9+
];

src/components/prompts/dto/prompt.dto.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,30 @@ import {
1010
SecuredInt,
1111
SecuredProperty,
1212
SecuredRichText,
13+
SecuredString,
1314
} from '~/common';
1415

1516
@ObjectType()
1617
export class Prompt extends Resource {
1718
@Field()
1819
readonly text: SecuredRichText;
1920
@Field()
21+
readonly shortLabel: SecuredString;
22+
@Field()
2023
readonly min: SecuredInt; // 1
2124
@Field()
2225
readonly max: SecuredInt; // 1
2326

2427
/** Fake DB entry for now. */
25-
static create({ id, text }: { id: string; text: string }): Prompt {
28+
static create({
29+
id,
30+
text,
31+
shortLabel,
32+
}: {
33+
id: string;
34+
text: string;
35+
shortLabel: string;
36+
}): Prompt {
2637
return {
2738
id: id as ID,
2839
createdAt: DateTime.now(),
@@ -31,6 +42,11 @@ export class Prompt extends Resource {
3142
canEdit: false,
3243
value: RichTextDocument.fromText(text),
3344
},
45+
shortLabel: {
46+
canRead: true,
47+
canEdit: false,
48+
value: shortLabel,
49+
},
3450
min: { value: 1, canRead: true, canEdit: false },
3551
max: { value: 1, canRead: true, canEdit: false },
3652
canDelete: false,
@@ -51,6 +67,9 @@ export abstract class PromptInput {
5167
@RichTextField()
5268
readonly text?: RichTextDocument;
5369

70+
@Field()
71+
readonly shortLabel?: string;
72+
5473
@Field(() => Int)
5574
@Min(0)
5675
readonly min?: number;

0 commit comments

Comments
 (0)