Skip to content

Commit

Permalink
Seed a few likes widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
nlsvgtr committed Dec 21, 2023
1 parent c5e7768 commit 2db0362
Showing 1 changed file with 27 additions and 16 deletions.
43 changes: 27 additions & 16 deletions apps/api-server/seeds/development.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,31 +38,32 @@ module.exports = async function seed(config, db) {
},
votes: {
isActive: true,
requiredUserRole: "anonymous",
requiredUserRole: 'anonymous',
isViewable: true,
withExisting: 'replace',
voteValues: [
{
label: "I like",
value: "yes"
label: 'I like',
value: 'yes'
},
{
label: "Don't know",
value: "mayby"
label: 'Don\'t know',
value: 'mayby'
},
{
label: "I do not like",
value: "no"
label: 'I do not like',
value: 'no'
}
]
},
},
});
project = await project.update({
"config": {
"votes": {
"isActive": true,
"requiredUserRole": "anonymous",
"isViewable": true
'config': {
'votes': {
'isActive': true,
'requiredUserRole': 'anonymous',
'isViewable': true
}
}
});
Expand Down Expand Up @@ -91,6 +92,9 @@ module.exports = async function seed(config, db) {
},
votes: {
isActive: true,
withExisting: 'replace',
requiredUserRole: 'anonymous',
isViewable: true,
}
},
});
Expand Down Expand Up @@ -505,12 +509,19 @@ module.exports = async function seed(config, db) {
opinion: 'yes',
});

console.log(' a widget');
console.log(' two widgets');
await db.Widget.create({
projectId: 2,
type: 'arguments',
description: 'An arguments widget',
config: {"general":{"resourceId":1,"sentiment":"for","isReplyingEnabled":true,"isVotingEnabled":true}},
type: 'likes',
description: 'Likes op plannen',
config: {"title":"Likes op plannen","variant":"medium","yesLabel":"Is goed","noLabel":"Liever niet","hideCounters":false},
});

await db.Widget.create({
projectId: 3,
type: 'likes',
description: 'Likes op begroot',
config: {"title":"Likes op begroot","variant":"medium","yesLabel":"Yes!","noLabel":"Neeee!","hideCounters":false},
});

console.log(' a choices-guide');
Expand Down

0 comments on commit 2db0362

Please sign in to comment.