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

Added helper_link and link seeder. #496

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions backend/seeders/seeders.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,30 @@ async function runSeeders(queryInterface) {
{}
);

await queryInterface.bulkInsert(
'hints',
[
{
action: 'open url',
url: 'https://guidefox-demo.bluewavelabs.ca',
actionButtonUrl: 'https://guidefox.io/',
actionButtonText: 'Take me to GuideFox page',
targetElement: '._sidebar_z57ma_16', //Pointing to GuideFox logo on top left side.
tooltipPlacement: 'right',
hintContent:
'Guidefox helps app owners build knowledge and user-experience oriented apps. It includes the following features: welcome tours, popups, banners, helper links, hints',
header: 'GuideFox Intro',
headerBackgroundColor: '#FFFFFF',
headerColor: '#101828',
textColor: '#101828',
buttonBackgroundColor: '#7F56D9',
buttonTextColor: '#FFFFFF',
createdBy: 1,
},
],
{}
);

await queryInterface.bulkInsert(
"popups",
[
Expand Down Expand Up @@ -59,6 +83,27 @@ async function runSeeders(queryInterface) {
{}
);

const [helperLink] = await queryInterface.bulkInsert(
'helper_link',
[
{
title: 'GuideFox Links',
headerBackgroundColor: '#adb2f5',
linkFontColor: '#344054',
iconColor: '#7F56D9',
createdBy: 1,
},
],
{ returning: true } // Return the created row to use its ID
);

const links = [
{ title: 'GuideFox Website', url: 'https://guidefox-demo.bluewavelabs.ca', target: true, helperId: helperLink.id },
{ title: 'GuideFox Repo', url: 'https://github.com/bluewave-labs/guidefox', target: false, helperId: helperLink.id },
];

await queryInterface.bulkInsert('link', links, {});

await queryInterface.bulkInsert(
"teams",
[
Expand Down