fix(general): tslint being applied in all sources.
This commit is contained in:
parent
69ca62bd35
commit
6de285e234
4 changed files with 10 additions and 9 deletions
|
@ -458,7 +458,7 @@ export class GBMinService {
|
||||||
if (context.activity.name === 'whoAmI') {
|
if (context.activity.name === 'whoAmI') {
|
||||||
await step.beginDialog('/whoAmI');
|
await step.beginDialog('/whoAmI');
|
||||||
} else if (context.activity.name === 'showSubjects') {
|
} else if (context.activity.name === 'showSubjects') {
|
||||||
await step.beginDialog('/menu');
|
await step.beginDialog('/menu', undefined);
|
||||||
} else if (context.activity.name === 'giveFeedback') {
|
} else if (context.activity.name === 'giveFeedback') {
|
||||||
await step.beginDialog('/feedback', {
|
await step.beginDialog('/feedback', {
|
||||||
fromMenu: true
|
fromMenu: true
|
||||||
|
|
|
@ -76,18 +76,20 @@ export class MenuDialog extends IGBDialog {
|
||||||
const user = await min.userProfile.get(step.context, {});
|
const user = await min.userProfile.get(step.context, {});
|
||||||
const args: MenuDialogArgs = step.options;
|
const args: MenuDialogArgs = step.options;
|
||||||
|
|
||||||
let rootSubjectId;
|
// tslint:disable-next-line: no-null-keyword
|
||||||
|
let rootSubjectId = null;
|
||||||
|
|
||||||
if (args !== undefined) {
|
if (Object.keys(args).length > 0) {
|
||||||
// If there is a shortcut specified as subject destination, go there.
|
// If there is a shortcut specified as subject destination, go there.
|
||||||
if (args.to !== undefined) {
|
if (args.to !== null) {
|
||||||
const dialog = args.to.split(':')[1];
|
const dialog = args.to.split(':')[1];
|
||||||
|
|
||||||
return await step.replaceDialog(`/${dialog}`);
|
return await step.replaceDialog(`/${dialog}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
user.subjects.push(args);
|
user.subjects.push(args);
|
||||||
rootSubjectId = args.subjectId;
|
// tslint:disable-next-line: no-null-keyword
|
||||||
|
rootSubjectId = args.subjectId === undefined ? null : args.subjectId;
|
||||||
|
|
||||||
// Whenever a subject is selected, shows a faq about it.
|
// Whenever a subject is selected, shows a faq about it.
|
||||||
if (user.subjects.length > 0) {
|
if (user.subjects.length > 0) {
|
||||||
|
|
|
@ -73,7 +73,7 @@ export class KBService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static getFormattedSubjectItems(subjects: GuaribasSubject[]) {
|
public static getFormattedSubjectItems(subjects: GuaribasSubject[]) {
|
||||||
if (subjects !== null) {
|
if (subjects === null) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
const out = [];
|
const out = [];
|
||||||
|
|
|
@ -10,9 +10,8 @@ export const Messages = {
|
||||||
here_is_subjects: 'Here are some subjects to choose from...',
|
here_is_subjects: 'Here are some subjects to choose from...',
|
||||||
menu_select: 'Select',
|
menu_select: 'Select',
|
||||||
lets_search: query =>
|
lets_search: query =>
|
||||||
`Vamos pesquisar sobre ${query}... O que deseja saber?`,
|
`Lets search for ${query}... What do you want to know?`,
|
||||||
see_faq:
|
see_faq: 'Please take a look at the FAQ I\'ve prepared for you. You can click on them to get the answer.',
|
||||||
'Please take a look at the FAQ I\'ve prepared for you. You can click on them to get the answer.',
|
|
||||||
will_answer_projector:
|
will_answer_projector:
|
||||||
'I\'ll answer on the projector to a better experience...',
|
'I\'ll answer on the projector to a better experience...',
|
||||||
ask_first_time: 'What are you looking for?'
|
ask_first_time: 'What are you looking for?'
|
||||||
|
|
Loading…
Add table
Reference in a new issue