Add JoFotara linking modal and fix company limit
This commit is contained in:
@@ -27,7 +27,7 @@ export class AuthService {
|
||||
private jwtService: JwtService,
|
||||
private configService: ConfigService,
|
||||
private dataSource: DataSource,
|
||||
) {}
|
||||
) { }
|
||||
|
||||
/**
|
||||
* تسجيل مستخدم جديد (مدير مكتب)
|
||||
@@ -60,7 +60,7 @@ export class AuthService {
|
||||
const subscription = queryRunner.manager.create(Subscription, {
|
||||
tenant_id: savedTenant.id,
|
||||
plan: SubscriptionPlan.BASIC,
|
||||
max_companies: 1,
|
||||
max_companies: 3, // -1 means unlimited
|
||||
max_invoices_per_month: 200,
|
||||
price_jod: 15, // Basic price
|
||||
status: SubscriptionStatus.ACTIVE,
|
||||
@@ -109,10 +109,10 @@ export class AuthService {
|
||||
throw new UnauthorizedException('Invalid credentials');
|
||||
}
|
||||
|
||||
const payload = {
|
||||
sub: user.id,
|
||||
tenantId: user.tenant_id,
|
||||
role: user.role
|
||||
const payload = {
|
||||
sub: user.id,
|
||||
tenantId: user.tenant_id,
|
||||
role: user.role
|
||||
};
|
||||
|
||||
const accessToken = await this.jwtService.signAsync(payload);
|
||||
@@ -152,10 +152,10 @@ export class AuthService {
|
||||
throw new UnauthorizedException('Access Denied');
|
||||
}
|
||||
|
||||
const payload = {
|
||||
sub: user.id,
|
||||
tenantId: user.tenant_id,
|
||||
role: user.role
|
||||
const payload = {
|
||||
sub: user.id,
|
||||
tenantId: user.tenant_id,
|
||||
role: user.role
|
||||
};
|
||||
|
||||
const accessToken = await this.jwtService.signAsync(payload);
|
||||
|
||||
Reference in New Issue
Block a user