Merge origin/master: resolve conflicts, keep RBAC and fixes
Made-with: Cursor
This commit is contained in:
@@ -131,7 +131,7 @@ model Employee {
|
|||||||
lastName String
|
lastName String
|
||||||
firstNameAr String?
|
firstNameAr String?
|
||||||
lastNameAr String?
|
lastNameAr String?
|
||||||
email String @unique
|
email String
|
||||||
phone String?
|
phone String?
|
||||||
mobile String
|
mobile String
|
||||||
dateOfBirth DateTime?
|
dateOfBirth DateTime?
|
||||||
|
|||||||
@@ -72,6 +72,40 @@ async function main() {
|
|||||||
|
|
||||||
console.log('✅ Created positions');
|
console.log('✅ Created positions');
|
||||||
|
|
||||||
|
// Employee position for ALL departments (added)
|
||||||
|
const salesEmployeePosition = await prisma.position.create({
|
||||||
|
data: {
|
||||||
|
title: 'Employee',
|
||||||
|
titleAr: 'موظف',
|
||||||
|
code: 'SALES_EMPLOYEE',
|
||||||
|
departmentId: salesDept.id,
|
||||||
|
level: 5,
|
||||||
|
description: 'General employee - Sales Department',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const itEmployeePosition = await prisma.position.create({
|
||||||
|
data: {
|
||||||
|
title: 'Employee',
|
||||||
|
titleAr: 'موظف',
|
||||||
|
code: 'IT_EMPLOYEE',
|
||||||
|
departmentId: itDept.id,
|
||||||
|
level: 5,
|
||||||
|
description: 'General employee - IT Department',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const hrEmployeePosition = await prisma.position.create({
|
||||||
|
data: {
|
||||||
|
title: 'Employee',
|
||||||
|
titleAr: 'موظف',
|
||||||
|
code: 'HR_EMPLOYEE',
|
||||||
|
departmentId: hrDept.id,
|
||||||
|
level: 5,
|
||||||
|
description: 'General employee - HR Department',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
// Create Permissions for GM (Full Access)
|
// Create Permissions for GM (Full Access)
|
||||||
const modules = ['contacts', 'crm', 'inventory', 'projects', 'hr', 'marketing'];
|
const modules = ['contacts', 'crm', 'inventory', 'projects', 'hr', 'marketing'];
|
||||||
for (const module of modules) {
|
for (const module of modules) {
|
||||||
|
|||||||
Reference in New Issue
Block a user