Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Onboarding landing construction #642

Merged
merged 13 commits into from
Mar 19, 2024
164 changes: 160 additions & 4 deletions src/app/branding/branding-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ const kbArticles: KbArticle = {
INTACCT: `${brandingConfig.helpArticleDomain}/en/collections/215867-integrations-with-fyle`,
TRAVELPERK: `${brandingConfig.helpArticleDomain}/en/articles/7549535-how-are-travelperk-invoices-created-as-expenses-in-fyle`,
SAGE300: `${brandingConfig.helpArticleDomain}/en/collections/215867-integrations-with-fyle`,
BUSINESS_CENTRAL: `${brandingConfig.helpArticleDomain}/en/articles/8911018-how-to-configure-the-fyle-dynamics-365-business-central-integration`
BUSINESS_CENTRAL: `${brandingConfig.helpArticleDomain}/en/articles/8911018-how-to-configure-the-fyle-dynamics-365-business-central-integration`,
XERO: `${brandingConfig.helpArticleDomain}/en/collections/215867-integrations-with-fyle#xero-2-0`
},
onboardingArticles: {
INTACCT: {
Expand Down Expand Up @@ -133,6 +134,15 @@ const kbArticles: KbArticle = {
PAYMENT_PROFILE_SETTINGS: 'https://help.fylehq.com/en/articles/7193187-how-to-set-up-the-fyle-travelperk-integration#h_0f8ebdfa10',
ADVANCED_SETTING: 'https://help.fylehq.com/en/articles/7193187-how-to-set-up-the-fyle-travelperk-integration#h_281acb3026',
LANDING: 'https://help.fylehq.com/en/articles/7193187-how-to-set-up-the-fyle-travelperk-integration'
},
// TODO
XERO: {
LANDING: `${brandingConfig.helpArticleDomain}/en/articles/6721333-how-to-set-up-the-fyle-xero-integration`,
CONNECTOR: `${brandingConfig.helpArticleDomain}/en/articles/6721333-how-to-set-up-the-fyle-xero-integration-v2-0#h_e3ade308dc`,
EMPLOYEE_SETTING: `${brandingConfig.helpArticleDomain}/en/articles/6208620-how-to-set-up-the-fyle-xero-integration-v2-0#h_d70f1d54cc`,
EXPORT_SETTING: `${brandingConfig.helpArticleDomain}/en/articles/6721333-how-to-set-up-the-fyle-xero-integration-v2-0#h_ad07470d98`,
IMPORT_SETTING: `${brandingConfig.helpArticleDomain}/en/articles/6721333-how-to-set-up-the-fyle-xero-integration-v2-0#h_04d289fd42`,
ADVANCED_SETTING: `${brandingConfig.helpArticleDomain}/en/articles/6721333-how-to-set-up-the-fyle-xero-integration-v2-0#h_d95b791edd`
}
}
},
Expand All @@ -145,7 +155,8 @@ const kbArticles: KbArticle = {
NETSUITE: `${brandingConfig.helpArticleDomain}/en/articles/4424242-fyle-netsuite-integration`,
TRAVELPERK: `${brandingConfig.helpArticleDomain}/en/articles/7549535-how-are-travelperk-invoices-created-as-expenses-in-fyle`,
SAGE300: `${brandingConfig.helpArticleDomain}/en/collections/215867-integrations-with-fyle`,
BUSINESS_CENTRAL: `${brandingConfig.helpArticleDomain}/en/collections/215867-integrations-with-fyle`
BUSINESS_CENTRAL: `${brandingConfig.helpArticleDomain}/en/collections/215867-integrations-with-fyle`,
XERO: `${brandingConfig.helpArticleDomain}/en/collections/215867-integrations-with-fyle`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

},
onboardingArticles: {
INTACCT: {
Expand Down Expand Up @@ -186,6 +197,15 @@ const kbArticles: KbArticle = {
PAYMENT_PROFILE_SETTINGS: 'https://help.fylehq.com/en/articles/7193187-how-to-set-up-the-fyle-travelperk-integration#h_0f8ebdfa10',
ADVANCED_SETTING: 'https://help.fylehq.com/en/articles/7193187-how-to-set-up-the-fyle-travelperk-integration#h_281acb3026',
LANDING: 'https://help.fylehq.com/en/articles/7193187-how-to-set-up-the-fyle-travelperk-integration'
},
// TODO
XERO: {
LANDING: `${brandingConfig.helpArticleDomain}/en/articles/6721333-how-to-set-up-the-fyle-xero-integration`,
CONNECTOR: `${brandingConfig.helpArticleDomain}/en/articles/6721333-how-to-set-up-the-fyle-xero-integration-v2-0#h_e3ade308dc`,
EMPLOYEE_SETTING: `${brandingConfig.helpArticleDomain}/en/articles/6208620-how-to-set-up-the-fyle-xero-integration-v2-0#h_d70f1d54cc`,
EXPORT_SETTING: `${brandingConfig.helpArticleDomain}/en/articles/6721333-how-to-set-up-the-fyle-xero-integration-v2-0#h_ad07470d98`,
IMPORT_SETTING: `${brandingConfig.helpArticleDomain}/en/articles/6721333-how-to-set-up-the-fyle-xero-integration-v2-0#h_04d289fd42`,
ADVANCED_SETTING: `${brandingConfig.helpArticleDomain}/en/articles/6721333-how-to-set-up-the-fyle-xero-integration-v2-0#h_d95b791edd`
}
}
}
Expand All @@ -203,7 +223,8 @@ const demoVideoLinks: DemoVideo = {
QBO: 'https://www.youtube.com/embed/b63lS2DG5j4',
// TODO: Update link for MS Dynamics
BUSINESS_CENTRAL: 'https://www.youtube.com/embed/2oYdc8KcQnk',
TRAVELPERK: 'https://www.youtube.com/embed/2oYdc8KcQnk'
TRAVELPERK: 'https://www.youtube.com/embed/2oYdc8KcQnk',
XERO: 'https://www.youtube.com/embed/IplJd7tGWBk'
}
},
co: {
Expand All @@ -214,7 +235,8 @@ const demoVideoLinks: DemoVideo = {
QBO: 'https://www.youtube.com/embed/b63lS2DG5j4',
// TODO: Update link for MS Dynamics
BUSINESS_CENTRAL: 'https://www.youtube.com/embed/2oYdc8KcQnk',
TRAVELPERK: 'https://www.youtube.com/embed/2oYdc8KcQnk'
TRAVELPERK: 'https://www.youtube.com/embed/2oYdc8KcQnk',
XERO: 'https://www.youtube.com/embed/IplJd7tGWBk'
}
}
};
Expand All @@ -225,6 +247,73 @@ export const brandingDemoVideoLinks = demoVideoLinks[brandingConfig.brandId];

const content: ContentConfiguration = {
fyle: {
xero: {
landing: {
contentText: 'Import data from Xero to ' + brandingConfig.brandName + ' and export expenses from ' + brandingConfig.brandName + ' to Xero. ',
guideHeaderText: 'Guide to setup your integrations'
},
common: {
readMoreText: 'Read more',
exportLogTabName: 'Export log',
viewExpenseText: 'View expense',
corporateCard: 'Corporate card',
errors: 'errors',
autoMap: 'Auto map',
customField: 'Add new custom field',
customFieldName: 'Field name',
customFieldPlaceholderName: 'Placeholder name',
customFieldType: 'Field type',
customFieldCreateandSave: 'Create and save',
tenantMapping: 'Tenant Mapping',
descriptionText: 'of the description field'
},
configuration: {
connector: {
configurationHeaderText: 'Connect to Xero Tenant',
configurationSubHeaderText: 'Connect to the Xero Tenant from which you would like to import and export data. The ' + brandingConfig.brandName + ' org and Xero Tenant cannot be changed once the configuration steps are complete.',
stepName: 'Connect to Xero',
subLabel: 'Expenses will be posted to the Xero Tenant Mapping selected here. Once configured, you can not change ' + brandingConfig.brandName + ' organization or Tenant Mapping.'
},
exportSetting: {
stepName: 'Export settings',
headerText: '',
contentText: 'Enable this to export non-reimbursable expenses from ' + brandingConfig.brandName + '. If not enabled, any <b>corporate credit card</b> expenses will not be exported to Xero.',
corporateCard: {
cccExpenseBankAccountSubLabel: 'The selected expense payment type will be added to the corporate credit card expenses exported from ' + brandingConfig.brandName + ' to Xero.',
creditCardExportTypeSubLabel: '',
expenseState: '',
creditCardExpenseSubLabel: ''
}
},
importSetting: {
stepName: 'Import Settings',
headerText: '',
contentText: '',
importCategoriesLabel: 'Import the Chart of Accounts as Categories in ',
importCategoriesSubLabel: 'Imported account will be available as Categories in ' + brandingConfig.brandName + '.',
importCustomersLabel: 'Import Customers from Xero',
importCustomersSubLabel: 'The Customers in Xero will be imported as Projects in Fyle and will be a selectable field while creating an expense',
taxCodeLabel: 'Import Tax from Xero',
taxCodeSubLabel: 'The imported Tax codes from Xero will be set as Tax group in ',
defaultTaxCodeLabel: 'Select Default Tax Code',
importSuppliersAsMerchantsLabel: 'Import Suppliers from Xero as Merchants',
notes: 'NOTE: To export billable expenses from Fyle, import Customers from Xero as Projects in Fyle.',
toggleToastMessage: 'You have already mapped a tracking category from Xero to the Project field in '+ brandingConfig.brandName +'. Change the configured mapping to a new field to be able to import Customers in the Project field.'
},
advancedSettings: {
stepName: 'Advanced settings',
scheduleAutoExport: 'Schedule automatic export',
email: 'Send error notification to',
autoSyncPayments: 'Auto-sync payment status for reimbursable expenses',
defaultPaymentAccount: 'Select payment account',
autoCreateEmployeeVendor: 'Auto-create ',
postEntriesCurrentPeriod: 'Post entries in the current accounting period',
setDescriptionField: 'Set the description field in Xero',
dfvLabel: 'Default field values',
dfvSubLabel: 'If you\'ve made a field mandatory in Xero but don\'t collect a value from your employees in the expense form, you can set a default value here to be added to all the expenses. For location and department, you can opt to use the values from your employee records in Xero.'
}
}
},
intacct: {
landing: {
contentText: 'Import data from Sage Intacct to ' + brandingConfig.brandName + ' and Export expenses from ' + brandingConfig.brandName + ' to Sage Intacct. ',
Expand Down Expand Up @@ -404,6 +493,73 @@ const content: ContentConfiguration = {
}
},
co: {
xero: {
landing: {
contentText: 'Import data from Xero to ' + brandingConfig.brandName + ' and export expenses from ' + brandingConfig.brandName + ' to Xero. ',
guideHeaderText: 'Guide to setup your integrations'
},
common: {
readMoreText: 'Read more',
exportLogTabName: 'Export log',
viewExpenseText: 'View expense',
corporateCard: 'Corporate card',
errors: 'errors',
autoMap: 'Auto map',
customField: 'Add new custom field',
customFieldName: 'Field name',
customFieldPlaceholderName: 'Placeholder name',
customFieldType: 'Field type',
customFieldCreateandSave: 'Create and save',
tenantMapping: 'Tenant Mapping',
descriptionText: 'of the description field'
},
configuration: {
connector: {
configurationHeaderText: 'Connect to Xero tenant',
configurationSubHeaderText: 'Connect to the Xero tenant from which you would like to import and export data. The ' + brandingConfig.brandName + ' org and Xero tenant cannot be changed once the configuration steps are complete.',
stepName: 'Connect to Xero',
subLabel: 'Expenses will be posted to the Xero tenant Mapping selected here. Once configured, you can not change ' + brandingConfig.brandName + ' organization or tenant mapping.'
},
exportSetting: {
stepName: 'Export settings',
headerText: '',
contentText: 'Enable this to export non-reimbursable expenses from ' + brandingConfig.brandName + '. If not enabled, any <b>corporate credit card</b> expenses will not be exported to Xero.',
corporateCard: {
cccExpenseBankAccountSubLabel: '',
creditCardExportTypeSubLabel: '',
expenseState: '',
creditCardExpenseSubLabel: ''
}
},
importSetting: {
stepName: 'Import Settings',
headerText: '',
contentText: '',
importCategoriesLabel: 'Import the chart of accounts as categories in ',
importCategoriesSubLabel: 'Imported account will be available as categories in ' + brandingConfig.brandName + '.',
importCustomersLabel: 'Import customers from Xero',
importCustomersSubLabel: 'The customers in Xero will be imported as projects in ' + brandingConfig.brandName + ' and will be a selectable field while creating an expense',
taxCodeLabel: 'Import tax from Xero',
taxCodeSubLabel: 'The imported tax codes from Xero will be set as tax group in ',
defaultTaxCodeLabel: 'Select default tax code',
importSuppliersAsMerchantsLabel: 'Import suppliers from Xero as merchants',
notes: 'NOTE: To export billable expenses from ' + brandingConfig.brandName + ', import customers from Xero as projects in ' + brandingConfig.brandName,
toggleToastMessage: 'You have already mapped a tracking category from Xero to the project field in '+ brandingConfig.brandName +'. Change the configured mapping to a new field to be able to import customers in the project field.'
},
advancedSettings: {
stepName: 'Advanced settings',
scheduleAutoExport: 'Schedule automatic export',
email: 'Send error notification to',
autoSyncPayments: 'Auto-sync payment status for reimbursable expenses',
defaultPaymentAccount: 'Select payment account',
autoCreateEmployeeVendor: 'Auto-create ',
postEntriesCurrentPeriod: 'Post entries in the current accounting period',
setDescriptionField: 'Set the description field in Xero',
dfvLabel: 'Default field values',
dfvSubLabel: 'If you\'ve made a field mandatory in Xero but don\'t collect a value from your employees in the expense form, you can set a default value here to be added to all the expenses. For location and department, you can opt to use the values from your employee records in Xero.'
}
}
},
intacct: {
landing: {
contentText: 'Import data from Sage Intacct to ' + brandingConfig.brandName + ' and export expenses from ' + brandingConfig.brandName + ' to Sage Intacct. ',
Expand Down
5 changes: 3 additions & 2 deletions src/app/core/guard/tenant.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ export class TenantGuard implements CanActivate {
).pipe(
map(response => !!response),
catchError(error => {
if (error.status === 400) {

if (error.status === 404) {
globalCacheBusterNotifier.next();
this.toastService.displayToastMessage(ToastSeverity.ERROR, 'Oops! You will need to select a tenant to proceed with the onboarding.');
return this.router.navigateByUrl('integrations/xero/onboarding/xero_connector');
return this.router.navigateByUrl('/integrations/xero/onboarding/landing');
}
return throwError(error);
})
Expand Down
67 changes: 67 additions & 0 deletions src/app/core/models/branding/content-configuration.model.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,72 @@
export type ContentConfiguration = {
[brandingId: string]: {
xero: {
landing: {
contentText: string;
guideHeaderText: string;
},
common: {
readMoreText: string;
exportLogTabName: string;
viewExpenseText: string;
corporateCard: string;
errors: string;
autoMap: string;
customField: string;
customFieldName: string;
customFieldPlaceholderName: string;
customFieldType: string;
customFieldCreateandSave: string;
tenantMapping: string;
descriptionText: string;
},
configuration: {
connector: {
stepName: string;
subLabel: string;
configurationHeaderText: string;
configurationSubHeaderText: string;
},
exportSetting: {
stepName: string;
headerText: string;
contentText: string;
corporateCard: {
cccExpenseBankAccountSubLabel: string;
creditCardExportTypeSubLabel: string;
expenseState: string;
creditCardExpenseSubLabel: string
}
},
importSetting: {
stepName: string;
headerText: string;
contentText: string;
importCategoriesLabel: string;
importCategoriesSubLabel: string;
importCustomersLabel: string;
importCustomersSubLabel: string;
taxCodeLabel: string;
taxCodeSubLabel: string;
defaultTaxCodeLabel: string;
importSuppliersAsMerchantsLabel: string;
notes: string,
toggleToastMessage: string
},
advancedSettings: {
stepName: string;
scheduleAutoExport: string;
email: string;
autoSyncPayments: string;
defaultPaymentAccount: string;
autoCreateEmployeeVendor: string;
postEntriesCurrentPeriod: string;
setDescriptionField: string;
dfvLabel: string;
dfvSubLabel: string;
}
},
},
intacct : {
landing: {
contentText: string;
Expand Down
1 change: 1 addition & 0 deletions src/app/core/models/branding/demo-video.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export type DemoVideo = {
QBO: string;
BUSINESS_CENTRAL: string;
TRAVELPERK: string;
XERO:string;
}
}
};
11 changes: 10 additions & 1 deletion src/app/core/models/branding/kb-article.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export type KbArticle = {
TRAVELPERK: string;
SAGE300: string;
BUSINESS_CENTRAL: string;
XERO: string;
},
onboardingArticles: {
INTACCT: {
Expand Down Expand Up @@ -49,7 +50,15 @@ export type KbArticle = {
PAYMENT_PROFILE_SETTINGS: string;
ADVANCED_SETTING: string;
LANDING: string;
}
},
XERO: {
LANDING: string;
CONNECTOR: string;
EMPLOYEE_SETTING: string;
EXPORT_SETTING: string;
IMPORT_SETTING: string;
ADVANCED_SETTING: string;
},
}
}
};
Loading
Loading