update for build
This commit is contained in:
@@ -3,6 +3,7 @@ import { ToastService } from '@/core/services/toast.service';
|
||||
import { Component, EventEmitter, inject, Input, Output, signal } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import images from 'src/assets/images';
|
||||
import config from 'src/config';
|
||||
import { LoginComponent } from './login/login.component';
|
||||
|
||||
type TSteps = 'login' | 'otp' | 'modifyLoginInfo' | 'signup';
|
||||
@@ -74,7 +75,7 @@ export class AuthComponent {
|
||||
break;
|
||||
case 'CONSUMER':
|
||||
if (this.accountRole() === 'OPERATOR') {
|
||||
redirectUrl = '/pos';
|
||||
redirectUrl = config.isPosApplication ? '/' : '/pos';
|
||||
} else {
|
||||
redirectUrl = '/consumer';
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<form [formGroup]="loginForm" class="w-full flex flex-col gap-4" (ngSubmit)="submit()">
|
||||
<form [formGroup]="loginForm" (submit)="submit()">
|
||||
<uikit-field name="username" pSize="large" [control]="loginForm.controls.username" label="نام کاربری">
|
||||
<input
|
||||
pInputText
|
||||
@@ -36,59 +36,8 @@
|
||||
/>
|
||||
</uikit-field>
|
||||
|
||||
<!-- <div class="flex items-center justify-between mt-2 mb-8 gap-8">
|
||||
<div class="flex items-center">
|
||||
<p-checkbox formControlName="rememberMe" id="rememberMe" binary class="me-2"></p-checkbox>
|
||||
<uikit-label name="rememberMe" pSize="small">مرا به خاطر بسپار</uikit-label>
|
||||
</div>
|
||||
<span class="text-sm font-medium no-underline ms-2 text-right cursor-pointer text-primary">
|
||||
رمز را فراموش کردید؟
|
||||
</span>
|
||||
</div> -->
|
||||
<div class="mb-6 flex flex-col items-center gap-4 w-[16rem] mx-auto">
|
||||
<!-- <div
|
||||
class="relative bg-surface-ground rounded-xl overflow-hidden shadow shrink-0 border border-(--p-inputtext-border-color) w-full aspect-[2]"
|
||||
>
|
||||
<img p-image id="captchaImage" [src]="captchaImageSrc()" class="w-full object-contain" />
|
||||
@if (isCaptchaLoading()) {
|
||||
<div class="absolute! inset-0 bg-surface-hover/50 flex items-center justify-center">
|
||||
<p-progress-spinner
|
||||
strokeWidth="4"
|
||||
fill="transparent"
|
||||
animationDuration="1s"
|
||||
[style]="{ width: '48px', height: '48px' }"
|
||||
/>
|
||||
</div>
|
||||
} @else if (isCaptchaExpired()) {
|
||||
<div
|
||||
class="absolute! inset-0 bg-surface-hover/70 flex items-center justify-center text-center p-2 text-sm font-medium cursor-pointer"
|
||||
(click)="onRefreshCaptcha()"
|
||||
>
|
||||
<i class="pi pi-refresh text-3xl! text-gray-500"></i>
|
||||
</div>
|
||||
}
|
||||
</div> -->
|
||||
<!-- <p-inputgroup>
|
||||
<input
|
||||
pInputText
|
||||
id="captcha"
|
||||
type="text"
|
||||
placeholder="کد کپچا را وارد کنید"
|
||||
class="w-full"
|
||||
formControlName="captcha"
|
||||
/>
|
||||
|
||||
<p-inputgroup-addon>
|
||||
<p-button icon="pi pi-refresh" severity="secondary" variant="text" (click)="onRefreshCaptchaImage()" />
|
||||
</p-inputgroup-addon>
|
||||
</p-inputgroup> -->
|
||||
</div>
|
||||
<div class="mb-6 flex flex-col items-center gap-4 w-[16rem] mx-auto"></div>
|
||||
<div class="grid grid-cols-1 gap-3">
|
||||
<!-- @if (loginForm.controls.role.value === "TEACHER") {
|
||||
<span class="w-full text-center text-sm select-none">
|
||||
برای ثبت نام در سامانه <a class="text-primary cursor-pointer" (click)="toSignup()">اینجا</a> کلیک کنید.
|
||||
</span>
|
||||
} -->
|
||||
<p-button label="ورود" styleClass="w-full" size="large" [loading]="isLoading()" type="submit"></p-button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user