Redesign login/register with Mento branding and email/mobile OTP.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-05 00:47:33 +03:30
co-authored by Cursor
parent aa3fe49ce6
commit c620d1d6d4
12 changed files with 1792 additions and 184 deletions
+20
View File
@@ -38,9 +38,12 @@ async function main() {
users: {
create: {
email,
mobile: '09120000001',
fullName: 'مدیر نمونه',
passwordHash,
role: 'owner',
emailVerifiedAt: new Date(),
mobileVerifiedAt: new Date(),
},
},
},
@@ -54,6 +57,17 @@ async function main() {
const owner = await prisma.user.findFirst({
where: { organizationId: org.id, email },
});
if (owner && !owner.mobile) {
await prisma.user.update({
where: { id: owner.id },
data: {
mobile: '09120000001',
emailVerifiedAt: owner.emailVerifiedAt ?? new Date(),
mobileVerifiedAt: owner.mobileVerifiedAt ?? new Date(),
},
});
console.log('Updated demo owner mobile: 09120000001');
}
// چندارزی نمونه
await prisma.organization.update({
@@ -93,9 +107,12 @@ async function main() {
data: {
organizationId: org.id,
email: salesEmail,
mobile: '09120000002',
fullName: 'کارشناس فروش نمونه',
passwordHash: await bcrypt.hash('demo1234', 10),
role: 'sales',
emailVerifiedAt: new Date(),
mobileVerifiedAt: new Date(),
},
});
console.log('Seeded sales user:', salesEmail, '/ demo1234');
@@ -110,9 +127,12 @@ async function main() {
data: {
organizationId: org.id,
email: adminEmail,
mobile: '09120000003',
fullName: 'مدیر سازمانی نمونه',
passwordHash: await bcrypt.hash('demo1234', 10),
role: 'admin',
emailVerifiedAt: new Date(),
mobileVerifiedAt: new Date(),
},
});
console.log('Seeded admin user:', adminEmail, '/ demo1234');