Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
CarsonF committed Oct 6, 2023
2 parents 73b7b73 + f746ade commit d70b107
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 47 deletions.
Original file line number Diff line number Diff line change
@@ -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.',
}),
];
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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?',
}),
];
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class ProgressReportHighlightsService extends PromptVariantResponseListSe
ProgressReportHighlightsRepository,
) {
protected async getPrompts(): Promise<readonly Prompt[]> {
return prompts;
return [];
}

protected async getPrivilegeContext(dto: UnsecuredDto<Highlight>) {
Expand All @@ -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)',
}),
];
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -28,10 +29,3 @@ export class ProgressReportTeamNewsService extends PromptVariantResponseListServ
);
}
}

const prompts = [
Prompt.create({
id: 'F4eY7VXhPpM',
text: 'News?',
}),
];
9 changes: 9 additions & 0 deletions src/components/progress-report/team-news/team-news-prompts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Prompt } from '../../prompts/dto';

export const prompts = [
Prompt.create({
id: 'F4eY7VXhPpM',
text: 'News?',
shortLabel: 'News?',
}),
];
21 changes: 20 additions & 1 deletion src/components/prompts/dto/prompt.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,30 @@ import {
SecuredInt,
SecuredProperty,
SecuredRichText,
SecuredString,
} from '~/common';

@ObjectType()
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(),
Expand All @@ -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,
Expand All @@ -51,6 +67,9 @@ export abstract class PromptInput {
@RichTextField()
readonly text?: RichTextDocument;

@Field()
readonly shortLabel?: string;

@Field(() => Int)
@Min(0)
readonly min?: number;
Expand Down

0 comments on commit d70b107

Please sign in to comment.