diff --git a/src/components/progress-report/community-stories/community-story-prompts.ts b/src/components/progress-report/community-stories/community-story-prompts.ts new file mode 100644 index 0000000000..831e4777ed --- /dev/null +++ b/src/components/progress-report/community-stories/community-story-prompts.ts @@ -0,0 +1,26 @@ +import { Prompt } from '../../prompts/dto'; + +export const prompts = [ + Prompt.create({ + id: 'bnrqZXOtEeW', + 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.)', + shortLabel: 'What are some responses you have seen in the community?', + }), + Prompt.create({ + id: 'Bn3zwnzb3JN', + text: 'How was the translated Scripture used among the churches, local ministries, or other groups in the last quarter?', + shortLabel: 'How was the translated Scripture used?', + }), + Prompt.create({ + id: 'MsdfnoZkYda', + 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.)', + shortLabel: + 'Share a specific example of how translated Scripture changed a person?', + }), + Prompt.create({ + id: 'P4FO95xsZ7A', + 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?', + shortLabel: + 'Tell how someone responded to the Scripture in a checking session.', + }), +]; diff --git a/src/components/progress-report/community-stories/progress-report-community-story.service.ts b/src/components/progress-report/community-stories/progress-report-community-story.service.ts index 26484950f2..1c0b3b2a41 100644 --- a/src/components/progress-report/community-stories/progress-report-community-story.service.ts +++ b/src/components/progress-report/community-stories/progress-report-community-story.service.ts @@ -8,6 +8,7 @@ import { Prompt } from '../../prompts/dto'; import { PromptVariantResponseListService } from '../../prompts/prompt-variant-response.service'; import { ProgressReport } from '../dto'; import { ProgressReportCommunityStory as CommunityStory } from '../dto/community-stories.dto'; +import { prompts } from './community-story-prompts'; import { ProgressReportCommunityStoryRepository } from './progress-report-community-story.repository'; @Injectable() @@ -28,22 +29,3 @@ export class ProgressReportCommunityStoryService extends PromptVariantResponseLi ); } } - -const prompts = [ - Prompt.create({ - id: 'bnrqZXOtEeW', - 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.)', - }), - Prompt.create({ - id: 'Bn3zwnzb3JN', - text: 'How was the translated Scripture used among the churches, local ministries, or other groups in the last quarter?', - }), - Prompt.create({ - id: 'MsdfnoZkYda', - 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.)', - }), - Prompt.create({ - id: 'P4FO95xsZ7A', - 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?', - }), -]; diff --git a/src/components/progress-report/highlights/progress-report-highlights.service.ts b/src/components/progress-report/highlights/progress-report-highlights.service.ts index b4ca090580..d69cd65ad8 100644 --- a/src/components/progress-report/highlights/progress-report-highlights.service.ts +++ b/src/components/progress-report/highlights/progress-report-highlights.service.ts @@ -15,7 +15,7 @@ export class ProgressReportHighlightsService extends PromptVariantResponseListSe ProgressReportHighlightsRepository, ) { protected async getPrompts(): Promise { - return prompts; + return []; } protected async getPrivilegeContext(dto: UnsecuredDto) { @@ -28,22 +28,3 @@ export class ProgressReportHighlightsService extends PromptVariantResponseListSe ); } } - -const prompts = [ - Prompt.create({ - id: 'B3HOymZDiwi', - 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)', - }), - Prompt.create({ - id: '3rLRHtQKsyy', - text: 'What terms or concepts were difficult to find the right word for in the local language? Please explain how you found a solution.', - }), - Prompt.create({ - id: 'zsuBZUOwy3b', - text: 'How has working on the translation affected team members or their families? Please give a specific example.', - }), - Prompt.create({ - id: '1uzkzNwBRk3', - 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)', - }), -]; diff --git a/src/components/progress-report/team-news/progress-report-team-news.service.ts b/src/components/progress-report/team-news/progress-report-team-news.service.ts index f9ddfa8ed1..9904252564 100644 --- a/src/components/progress-report/team-news/progress-report-team-news.service.ts +++ b/src/components/progress-report/team-news/progress-report-team-news.service.ts @@ -9,6 +9,7 @@ import { PromptVariantResponseListService } from '../../prompts/prompt-variant-r import { ProgressReport } from '../dto'; import { ProgressReportTeamNews as TeamNews } from '../dto/team-news.dto'; import { ProgressReportTeamNewsRepository } from './progress-report-team-news.repository'; +import { prompts } from './team-news-prompts'; @Injectable() export class ProgressReportTeamNewsService extends PromptVariantResponseListService( @@ -28,10 +29,3 @@ export class ProgressReportTeamNewsService extends PromptVariantResponseListServ ); } } - -const prompts = [ - Prompt.create({ - id: 'F4eY7VXhPpM', - text: 'News?', - }), -]; diff --git a/src/components/progress-report/team-news/team-news-prompts.ts b/src/components/progress-report/team-news/team-news-prompts.ts new file mode 100644 index 0000000000..86165e2910 --- /dev/null +++ b/src/components/progress-report/team-news/team-news-prompts.ts @@ -0,0 +1,9 @@ +import { Prompt } from '../../prompts/dto'; + +export const prompts = [ + Prompt.create({ + id: 'F4eY7VXhPpM', + text: 'News?', + shortLabel: 'News?', + }), +]; diff --git a/src/components/prompts/dto/prompt.dto.ts b/src/components/prompts/dto/prompt.dto.ts index 15919344cc..cd9c5d59d6 100644 --- a/src/components/prompts/dto/prompt.dto.ts +++ b/src/components/prompts/dto/prompt.dto.ts @@ -10,6 +10,7 @@ import { SecuredInt, SecuredProperty, SecuredRichText, + SecuredString, } from '~/common'; @ObjectType() @@ -17,12 +18,22 @@ export class Prompt extends Resource { @Field() readonly text: SecuredRichText; @Field() + readonly shortLabel: SecuredString; + @Field() readonly min: SecuredInt; // 1 @Field() readonly max: SecuredInt; // 1 /** Fake DB entry for now. */ - static create({ id, text }: { id: string; text: string }): Prompt { + static create({ + id, + text, + shortLabel, + }: { + id: string; + text: string; + shortLabel: string; + }): Prompt { return { id: id as ID, createdAt: DateTime.now(), @@ -31,6 +42,11 @@ export class Prompt extends Resource { canEdit: false, value: RichTextDocument.fromText(text), }, + shortLabel: { + canRead: true, + canEdit: false, + value: shortLabel, + }, min: { value: 1, canRead: true, canEdit: false }, max: { value: 1, canRead: true, canEdit: false }, canDelete: false, @@ -51,6 +67,9 @@ export abstract class PromptInput { @RichTextField() readonly text?: RichTextDocument; + @Field() + readonly shortLabel?: string; + @Field(() => Int) @Min(0) readonly min?: number;