feat(project): menambahkan background_color untuk icon project
This commit is contained in:
+6
-5
@@ -1,6 +1,7 @@
|
||||
const bcrypt = require('bcrypt');
|
||||
const { PrismaClient } = require('../src/generated/prisma');
|
||||
const prisma = new PrismaClient();
|
||||
const { getProjectBackgroundColor } = require('../src/helpers/utils/projectTheme');
|
||||
|
||||
// Diperlukan ketika isi databasenya masih kosong dan ingin menambahkan dummy data sebagai testing development [Rafi 08/06/2026 16:34]
|
||||
async function main() {
|
||||
@@ -175,19 +176,19 @@ async function main() {
|
||||
|
||||
// 10. Project
|
||||
const proj1 = await prisma.project.create({
|
||||
data: { id_admin: admin1.id, project_icon: 'code', project_name: 'Internify Platform Dev', slug: slugify('Internify Platform Dev', 'Project 1 slug'), description: 'Upgrading the core Internify platform backend and web client.', start_date: new Date('2026-07-15'), end_date: new Date('2026-10-15'), status: 'active' }
|
||||
data: { id_admin: admin1.id, project_icon: 'code', background_color: getProjectBackgroundColor('code'), project_name: 'Internify Platform Dev', slug: slugify('Internify Platform Dev', 'Project 1 slug'), description: 'Upgrading the core Internify platform backend and web client.', start_date: new Date('2026-07-15'), end_date: new Date('2026-10-15'), status: 'active' }
|
||||
});
|
||||
const proj2 = await prisma.project.create({
|
||||
data: { id_admin: admin2.id, project_icon: 'shield', project_name: 'Auth Gateway Module', slug: slugify('Auth Gateway Module', 'Project 2 slug'), description: 'Securing API gateway with unified OAuth2 authentication.', start_date: new Date('2026-07-15'), end_date: new Date('2026-10-15'), status: 'active' }
|
||||
data: { id_admin: admin2.id, project_icon: 'shield', background_color: getProjectBackgroundColor('shield'), project_name: 'Auth Gateway Module', slug: slugify('Auth Gateway Module', 'Project 2 slug'), description: 'Securing API gateway with unified OAuth2 authentication.', start_date: new Date('2026-07-15'), end_date: new Date('2026-10-15'), status: 'active' }
|
||||
});
|
||||
const proj3 = await prisma.project.create({
|
||||
data: { id_admin: admin1.id, project_icon: 'chart', project_name: 'Recruitment Analytics Dashboard', slug: slugify('Recruitment Analytics Dashboard', 'Project 3 slug'), description: 'Developing analytical charts for recruitment metrics.', start_date: new Date('2026-07-15'), end_date: new Date('2026-10-15'), status: 'active' }
|
||||
data: { id_admin: admin1.id, project_icon: 'chart', background_color: getProjectBackgroundColor('chart'), project_name: 'Recruitment Analytics Dashboard', slug: slugify('Recruitment Analytics Dashboard', 'Project 3 slug'), description: 'Developing analytical charts for recruitment metrics.', start_date: new Date('2026-07-15'), end_date: new Date('2026-10-15'), status: 'active' }
|
||||
});
|
||||
const proj4 = await prisma.project.create({
|
||||
data: { id_admin: mentor1.id, project_icon: 'gear', project_name: 'Mentor Backend Task Management Project', slug: slugify('Mentor Backend Project', 'Project 4 slug'), description: 'Project owned by mentor for backend project and task management.', start_date: new Date('2026-07-20'), end_date: new Date('2026-10-15'), status: 'active' }
|
||||
data: { id_admin: mentor1.id, project_icon: 'gear', background_color: getProjectBackgroundColor('gear'), project_name: 'Mentor Backend Task Management Project', slug: slugify('Mentor Backend Project', 'Project 4 slug'), description: 'Project owned by mentor for backend project and task management.', start_date: new Date('2026-07-20'), end_date: new Date('2026-10-15'), status: 'active' }
|
||||
});
|
||||
const proj5 = await prisma.project.create({
|
||||
data: { id_admin: mentor2.id, project_icon: 'clipboard', project_name: 'Mentor UI UX Evaluation Project', slug: slugify('Mentor UI UX Evaluation Project', 'Project 5 slug'), description: 'Project owned by mentor for testing UI/UX mentoring workflow.', start_date: new Date('2026-07-18'), end_date: new Date('2026-10-15'), status: 'active' }
|
||||
data: { id_admin: mentor2.id, project_icon: 'clipboard', background_color: getProjectBackgroundColor('clipboard'), project_name: 'Mentor UI UX Evaluation Project', slug: slugify('Mentor UI UX Evaluation Project', 'Project 5 slug'), description: 'Project owned by mentor for testing UI/UX mentoring workflow.', start_date: new Date('2026-07-18'), end_date: new Date('2026-10-15'), status: 'active' }
|
||||
});
|
||||
|
||||
// 11. LamaranMagang
|
||||
|
||||
Reference in New Issue
Block a user