From f03cc195a7eeb7562776c3117b65703ddfad2d8b Mon Sep 17 00:00:00 2001 From: Gaurav Kumar Date: Sat, 27 Sep 2025 16:23:30 +0530 Subject: [PATCH] routing --- .../login-page/login-page.component.html | 186 ++++- .../login-page/login-page.component.scss | 666 +++++++++++++++- .../login/login-page/login-page.component.ts | 84 +- .../Stepper_workflow.component.ts | 42 +- .../menuaccesscontrol.component.html | 558 ++++++++----- .../menuaccesscontrol.component.scss | 742 ++++++++++++++++- .../menuaccesscontrol.component.ts | 95 ++- .../menumaintance.component.html | 474 +++++++---- .../menumaintance.component.scss | 588 ++++++++++++++ .../menumaintance/menumaintance.component.ts | 77 +- .../main/admin/submenu/submenu.component.html | 105 ++- .../main/admin/submenu/submenu.component.scss | 85 ++ .../main/admin/submenu/submenu.component.ts | 40 +- .../usergrpmaintenance.component.html | 454 ++++++----- .../usergrpmaintenance.component.scss | 750 +++++++++++++++++- .../usergrpmaintenance.component.ts | 73 +- .../usermaintance.component.html | 276 ++++--- .../usermaintance.component.scss | 652 ++++++++++++++- .../usermaintance/usermaintance.component.ts | 77 +- .../usermaintanceadd.component.html | 535 ++++++------- .../usermaintanceadd.component.scss | 382 +++++++++ .../usermaintanceadd.component.ts | 234 +++--- .../usermaintanceedit.component.html | 545 ++++++------- .../usermaintanceedit.component.scss | 374 +++++++++ .../usermaintanceedit.component.ts | 165 ++-- .../sequencegenarator.component.html | 598 +++++++++----- .../sequencegenarator.component.scss | 726 +++++++++++++++-- .../sequencegenarator.component.ts | 94 ++- .../modules/main/layout/layout.component.html | 299 ++++--- .../modules/main/layout/layout.component.scss | 681 ++++++++++++++++ .../modules/main/layout/layout.component.ts | 356 ++++----- .../main/main-page/main-page.component.html | 239 +++++- .../main/main-page/main-page.component.scss | 510 ++++++++++++ .../main/main-page/main-page.component.ts | 7 +- .../theme-customization.component.html | 280 +++++++ .../theme-customization.component.scss | 622 +++++++++++++++ .../theme-customization.component.ts | 246 ++++++ .../src/app/services/api/login.service.ts | 4 +- .../src/app/services/theme.service.ts | 326 ++++++++ .../dynamic-form/dynamic-form.component.ts | 89 +++ .../field-types/base-field.component.ts | 25 + .../field-types/field-factory.service.ts | 52 ++ .../field-types/field-types.module.ts | 44 + .../components/field-types/field-types.scss | 364 +++++++++ .../shared/components/field-types/index.ts | 8 + .../field-types/number-field.component.ts | 38 + .../field-types/paragraph-field.component.ts | 43 + .../field-types/password-field.component.ts | 89 +++ .../field-types/phone-field.component.ts | 72 ++ .../field-types/text-field.component.ts | 43 + .../field-types/textarea-field.component.ts | 43 + .../src/app/shared/shared.module.ts | 14 + .../src/assets/i18n/en.json | 1 + .../angular-clarity-master/src/styles.scss | 89 ++- .../src/styles/_animations.scss | 602 ++++++++++++++ .../src/styles/_base.scss | 411 ++++++++++ .../src/styles/_components.scss | 709 +++++++++++++++++ .../src/styles/_design-tokens.scss | 258 ++++++ .../src/styles/_theme-variables.scss | 367 +++++++++ 59 files changed, 14405 insertions(+), 2203 deletions(-) create mode 100644 frontend/angular-clarity-master/src/app/modules/main/theme-customization/theme-customization.component.html create mode 100644 frontend/angular-clarity-master/src/app/modules/main/theme-customization/theme-customization.component.scss create mode 100644 frontend/angular-clarity-master/src/app/modules/main/theme-customization/theme-customization.component.ts create mode 100644 frontend/angular-clarity-master/src/app/services/theme.service.ts create mode 100644 frontend/angular-clarity-master/src/app/shared/components/dynamic-form/dynamic-form.component.ts create mode 100644 frontend/angular-clarity-master/src/app/shared/components/field-types/base-field.component.ts create mode 100644 frontend/angular-clarity-master/src/app/shared/components/field-types/field-factory.service.ts create mode 100644 frontend/angular-clarity-master/src/app/shared/components/field-types/field-types.module.ts create mode 100644 frontend/angular-clarity-master/src/app/shared/components/field-types/field-types.scss create mode 100644 frontend/angular-clarity-master/src/app/shared/components/field-types/index.ts create mode 100644 frontend/angular-clarity-master/src/app/shared/components/field-types/number-field.component.ts create mode 100644 frontend/angular-clarity-master/src/app/shared/components/field-types/paragraph-field.component.ts create mode 100644 frontend/angular-clarity-master/src/app/shared/components/field-types/password-field.component.ts create mode 100644 frontend/angular-clarity-master/src/app/shared/components/field-types/phone-field.component.ts create mode 100644 frontend/angular-clarity-master/src/app/shared/components/field-types/text-field.component.ts create mode 100644 frontend/angular-clarity-master/src/app/shared/components/field-types/textarea-field.component.ts create mode 100644 frontend/angular-clarity-master/src/app/shared/shared.module.ts create mode 100644 frontend/angular-clarity-master/src/styles/_animations.scss create mode 100644 frontend/angular-clarity-master/src/styles/_base.scss create mode 100644 frontend/angular-clarity-master/src/styles/_components.scss create mode 100644 frontend/angular-clarity-master/src/styles/_design-tokens.scss create mode 100644 frontend/angular-clarity-master/src/styles/_theme-variables.scss diff --git a/frontend/angular-clarity-master/src/app/modules/login/login-page/login-page.component.html b/frontend/angular-clarity-master/src/app/modules/login/login-page/login-page.component.html index df4eba9..774fa24 100644 --- a/frontend/angular-clarity-master/src/app/modules/login/login-page/login-page.component.html +++ b/frontend/angular-clarity-master/src/app/modules/login/login-page/login-page.component.html @@ -1,39 +1,155 @@ - + +
+ + - + +
+ + +
+
+
+

Welcome Back

+

Sign in to your account to continue

+
+ + + + + +
+
+ + + + + + + + +
- \ No newline at end of file + --> \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/login/login-page/login-page.component.scss b/frontend/angular-clarity-master/src/app/modules/login/login-page/login-page.component.scss index 221d360..1edea49 100644 --- a/frontend/angular-clarity-master/src/app/modules/login/login-page/login-page.component.scss +++ b/frontend/angular-clarity-master/src/app/modules/login/login-page/login-page.component.scss @@ -1,23 +1,653 @@ - .tamplate1 { - background-image: url(../../../../assets/images/new.png); - background-repeat: no-repeat; - background-size: 60%; - background-position: right center; - border: 1px solid #000; +// ======================================== +// MODERN AI-INSPIRED LOGIN PAGE STYLES +// ======================================== + +@import '../../../../styles/design-tokens'; + +// Modern Login Container +.modern-login-container { + min-height: 100vh; + display: flex; + align-items: center; + justify-content: center; + position: relative; + overflow: hidden; + background: linear-gradient(135deg, $primary-50 0%, $primary-100 50%, $secondary-50 100%); +} + +// Background Elements +.login-background { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 1; + overflow: hidden; + + .gradient-overlay { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: linear-gradient(135deg, + rgba($primary-600, 0.1) 0%, + rgba($primary-400, 0.05) 50%, + rgba($accent-purple, 0.1) 100%); } - - .tamplate2 { - background-image: url(../../../../assets/images/new.png); - background-repeat: no-repeat; - background-size: 60%; - background-position: left center; + + .floating-shapes { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + + .shape { + position: absolute; + border-radius: 50%; + background: linear-gradient(45deg, rgba($primary-400, 0.1), rgba($accent-purple, 0.1)); + animation: float 6s ease-in-out infinite; + + &.shape-1 { + width: 200px; + height: 200px; + top: 10%; + left: 10%; + animation-delay: 0s; + } + + &.shape-2 { + width: 150px; + height: 150px; + top: 60%; + right: 15%; + animation-delay: 2s; + } + + &.shape-3 { + width: 100px; + height: 100px; + bottom: 20%; + left: 20%; + animation-delay: 4s; + } + + &.shape-4 { + width: 80px; + height: 80px; + top: 30%; + right: 30%; + animation-delay: 1s; + } + } + } +} + +// Main Content +.login-content { + position: relative; + z-index: 2; + display: grid; + grid-template-columns: 1fr 1fr; + max-width: 1200px; + width: 100%; + margin: 0 auto; + padding: $space-8; + gap: $space-12; + align-items: center; +} + +// Left Side - Branding +.login-branding { + display: flex; + align-items: center; + justify-content: center; + padding: $space-8; + + .brand-content { + text-align: center; + max-width: 400px; + } + + .logo-section { + margin-bottom: $space-8; + + .logo-container { + position: relative; + display: inline-block; + margin-bottom: $space-6; + + .logo-img { + width: 80px; + height: 80px; + object-fit: contain; + filter: drop-shadow(0 8px 16px rgba($primary-600, 0.3)); + transition: transform $duration-300 $ease-out; + } + + .logo-glow { + position: absolute; + top: -10px; + left: -10px; + right: -10px; + bottom: -10px; + background: linear-gradient(45deg, $primary-400, $accent-purple); + border-radius: 50%; + opacity: 0; + filter: blur(20px); + transition: opacity $duration-300 $ease-out; + } + + &:hover { + .logo-img { + transform: scale(1.1); + } + + .logo-glow { + opacity: 0.3; + } + } + } + + .brand-title { + font-size: $text-4xl; + font-weight: $font-bold; + color: $gray-900; + margin-bottom: $space-2; + background: linear-gradient(135deg, $primary-600, $accent-purple); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-clip: text; + } + + .brand-subtitle { + font-size: $text-lg; + color: $gray-600; + font-weight: $font-medium; + } + } + + .brand-features { display: flex; - justify-content: flex-end; - align-items: center; - border: 1px solid #000; + flex-direction: column; + gap: $space-4; + + .feature-item { + display: flex; + align-items: center; + gap: $space-3; + padding: $space-3; + background: rgba(255, 255, 255, 0.8); + border-radius: $radius-lg; + backdrop-filter: $backdrop-blur-sm; + border: 1px solid rgba(255, 255, 255, 0.2); + transition: all $duration-200 $ease-out; + + &:hover { + transform: translateX(8px); + background: rgba(255, 255, 255, 0.9); + box-shadow: $shadow-md; + } + + .feature-icon { + color: $primary-600; + font-size: $text-lg; + } + + span { + font-size: $text-sm; + font-weight: $font-medium; + color: $gray-700; + } + } } - .signup { - cursor: pointer; - // color:#80b0ff; +} + +// Right Side - Login Form +.login-form-section { + display: flex; + align-items: center; + justify-content: center; + padding: $space-8; + + .form-container { + width: 100%; + max-width: 400px; + background: rgba(255, 255, 255, 0.95); + backdrop-filter: $backdrop-blur-md; + border-radius: $radius-2xl; + padding: $space-8; + box-shadow: $shadow-xl; + border: 1px solid rgba(255, 255, 255, 0.2); } + + .form-header { + text-align: center; + margin-bottom: $space-8; + + .form-title { + font-size: $text-2xl; + font-weight: $font-bold; + color: $gray-900; + margin-bottom: $space-2; + } + + .form-subtitle { + font-size: $text-sm; + color: $gray-600; + } + } + + .modern-login-form { + .form-group { + margin-bottom: $space-6; + + .form-label { + display: block; + font-size: $text-sm; + font-weight: $font-semibold; + color: $gray-700; + margin-bottom: $space-2; + } + + .input-container { + position: relative; + display: flex; + align-items: center; + + .input-icon { + position: absolute; + left: $space-3; + color: $gray-400; + font-size: $text-base; + z-index: 2; + } + + .modern-input { + width: 100%; + padding: $space-3 $space-3 $space-3 $space-10; + border: 2px solid $gray-200; + border-radius: $radius-lg; + font-size: $text-sm; + font-weight: $font-medium; + color: $gray-900; + background: $white; + transition: all $duration-200 $ease-out; + + &::placeholder { + color: $gray-400; + } + + &:focus { + outline: none; + border-color: $primary-500; + box-shadow: 0 0 0 3px rgba($primary-500, 0.1); + } + + &:hover { + border-color: $gray-300; + } + } + + // Password field with toggle button + &:has(.password-toggle) .modern-input { + padding-right: $space-10; + } + + .password-toggle { + position: absolute; + right: $space-3; + top: 50%; + transform: translateY(-50%); + background: none; + border: none; + color: $gray-400; + cursor: pointer; + padding: $space-1; + border-radius: $radius-sm; + transition: all $duration-200 $ease-out; + z-index: 2; + + &:hover { + color: $gray-600; + background: rgba($gray-100, 0.5); + } + + &:focus { + outline: none; + color: $primary-600; + background: rgba($primary-50, 0.5); + } + + clr-icon { + font-size: $text-base; + } + + .toggle-text { + font-size: $text-xs; + font-weight: $font-semibold; + color: inherit; + text-transform: uppercase; + letter-spacing: 0.05em; + } + } + } + } + + .form-options { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: $space-6; + + .checkbox-container { + display: flex; + align-items: center; + gap: $space-2; + cursor: pointer; + + .modern-checkbox { + width: 18px; + height: 18px; + accent-color: $primary-600; + } + + .checkbox-label { + font-size: $text-sm; + color: $gray-600; + font-weight: $font-medium; + } + } + + .forgot-link { + font-size: $text-sm; + color: $primary-600; + text-decoration: none; + font-weight: $font-medium; + transition: color $duration-200 $ease-out; + + &:hover { + color: $primary-700; + } + } + } + + .error-message { + display: flex; + align-items: center; + gap: $space-2; + padding: $space-3; + background: rgba($accent-red, 0.1); + border: 1px solid rgba($accent-red, 0.2); + border-radius: $radius-lg; + margin-bottom: $space-6; + color: $accent-red; + font-size: $text-sm; + font-weight: $font-medium; + + clr-icon { + font-size: $text-base; + } + } + + .modern-login-btn { + width: 100%; + padding: $space-4; + background: linear-gradient(135deg, $primary-600, $primary-700); + color: $white; + border: none; + border-radius: $radius-lg; + font-size: $text-base; + font-weight: $font-semibold; + cursor: pointer; + transition: all $duration-200 $ease-out; + position: relative; + overflow: hidden; + + &:hover:not(:disabled) { + transform: translateY(-2px); + box-shadow: $shadow-lg; + background: linear-gradient(135deg, $primary-700, $primary-800); + } + + &:active { + transform: translateY(0); + } + + &:disabled { + opacity: 0.6; + cursor: not-allowed; + transform: none; + } + + &.loading { + .btn-content { + opacity: 0; + } + + .btn-loading { + opacity: 1; + } + } + + .btn-content { + display: flex; + align-items: center; + justify-content: center; + gap: $space-2; + transition: opacity $duration-200 $ease-out; + } + + .btn-loading { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + display: flex; + align-items: center; + gap: $space-2; + opacity: 0; + transition: opacity $duration-200 $ease-out; + + .spinner { + width: 16px; + height: 16px; + border: 2px solid rgba(255, 255, 255, 0.3); + border-top: 2px solid $white; + border-radius: 50%; + animation: spin 1s linear infinite; + } + } + } + + .signup-section { + text-align: center; + margin-top: $space-6; + + .signup-text { + font-size: $text-sm; + color: $gray-600; + + .signup-link { + color: $primary-600; + text-decoration: none; + font-weight: $font-semibold; + transition: color $duration-200 $ease-out; + + &:hover { + color: $primary-700; + } + } + } + } + } + + .social-login { + margin-top: $space-8; + + .divider { + position: relative; + text-align: center; + margin-bottom: $space-6; + + &::before { + content: ''; + position: absolute; + top: 50%; + left: 0; + right: 0; + height: 1px; + background: $gray-200; + } + + span { + background: rgba(255, 255, 255, 0.95); + padding: 0 $space-4; + font-size: $text-xs; + color: $gray-500; + font-weight: $font-medium; + } + } + + .social-buttons { + display: grid; + grid-template-columns: 1fr 1fr; + gap: $space-3; + + .social-btn { + display: flex; + align-items: center; + justify-content: center; + gap: $space-2; + padding: $space-3; + border: 2px solid $gray-200; + border-radius: $radius-lg; + background: $white; + color: $gray-700; + font-size: $text-sm; + font-weight: $font-medium; + cursor: pointer; + transition: all $duration-200 $ease-out; + + &:hover { + border-color: $gray-300; + transform: translateY(-1px); + box-shadow: $shadow-md; + } + + &.google-btn:hover { + border-color: #db4437; + color: #db4437; + } + + &.microsoft-btn:hover { + border-color: #0078d4; + color: #0078d4; + } + + clr-icon { + font-size: $text-base; + } + } + } + } +} + +// Animations +@keyframes float { + 0%, 100% { + transform: translateY(0px) rotate(0deg); + } + 50% { + transform: translateY(-20px) rotate(180deg); + } +} + +@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} + +// Responsive Design +@media (max-width: $breakpoint-lg) { + .login-content { + grid-template-columns: 1fr; + gap: $space-8; + padding: $space-6; + } + + .login-branding { + order: 2; + padding: $space-4; + + .brand-content { + max-width: 100%; + } + + .logo-section .brand-title { + font-size: $text-3xl; + } + + .brand-features { + flex-direction: row; + flex-wrap: wrap; + justify-content: center; + } + } + + .login-form-section { + order: 1; + padding: $space-4; + + .form-container { + padding: $space-6; + } + } +} + +@media (max-width: $breakpoint-md) { + .modern-login-container { + padding: $space-4; + } + + .login-content { + padding: $space-4; + } + + .login-branding { + .brand-features { + flex-direction: column; + } + } + + .login-form-section .form-container { + padding: $space-4; + } +} + +// Legacy styles (preserved for compatibility) +.tamplate1 { + background-image: url(../../../../assets/images/new.png); + background-repeat: no-repeat; + background-size: 60%; + background-position: right center; + border: 1px solid #000; +} + +.tamplate2 { + background-image: url(../../../../assets/images/new.png); + background-repeat: no-repeat; + background-size: 60%; + background-position: left center; + display: flex; + justify-content: flex-end; + align-items: center; + border: 1px solid #000; +} + +.signup { + cursor: pointer; +} diff --git a/frontend/angular-clarity-master/src/app/modules/login/login-page/login-page.component.ts b/frontend/angular-clarity-master/src/app/modules/login/login-page/login-page.component.ts index be82326..d31362b 100644 --- a/frontend/angular-clarity-master/src/app/modules/login/login-page/login-page.component.ts +++ b/frontend/angular-clarity-master/src/app/modules/login/login-page/login-page.component.ts @@ -41,6 +41,8 @@ export class LoginPageComponent implements OnInit { email = ''; password = ''; isError = false; + isLoading = false; + showPassword = false; model: any = {}; errMsg: string = ''; @@ -71,32 +73,80 @@ export class LoginPageComponent implements OnInit { } onLogin() { + console.log('onLogin called'); + console.log('Form data:', { email: this.model.email, password: this.model.password }); + + // Reset error state + this.isError = false; + this.errMsg = ''; + + // Validate inputs + if (!this.model.email || !this.model.password) { + this.isError = true; + this.errMsg = 'Please enter both email and password'; + console.log('Validation failed - missing email or password'); + return; + } + + // Set loading state + this.isLoading = true; + console.log('Loading state set to true, making API call...'); + // tslint:disable-next-line:max-line-length this.loginService.getToken(this.model.email, this.model.password) - .subscribe(resp => { - if (resp.user === undefined || resp.user.token === undefined || resp.user.token === "INVALID") { - this.errMsg = 'Checking Email or password'; - return; - } - this.router.navigate([resp.landingPage]);// add , {skipLocationChange: true} - }, + .subscribe( + resp => { + console.log('API Response received:', resp); + this.isLoading = false; + + // Handle different response formats + if (resp.operationStatus === 'ERROR') { + this.isError = true; + this.errMsg = resp.operationMessage || 'Login failed'; + return; + } + // Handle different response formats + if (resp.success === 'false') { + this.isError = true; + this.errMsg = resp.message || 'Login failed'; + return; + } + if (resp.user === undefined || resp.user.token === undefined || resp.user.token === "INVALID") { + this.isError = true; + this.errMsg = 'Invalid email or password'; + return; + } + + // Success - navigate to landing page + console.log('Login successful, navigating to:', resp.landingPage); + this.router.navigate([resp.landingPage]); + }, (errResponse: HttpErrorResponse) => { + console.log('API Error received:', errResponse); + this.isLoading = false; + this.isError = true; + switch (errResponse.status) { case 401: this.errMsg = 'Email or password is incorrect'; break; case 404: this.errMsg = 'Service not found'; + break; case 408: - this.errMsg = 'Request Timedout'; + this.errMsg = 'Request timeout'; + break; case 500: - this.errMsg = 'Internal Server Error'; + this.errMsg = 'Internal server error'; + break; + case 0: + this.errMsg = 'Network error - please check your connection'; + break; default: - this.errMsg = 'Server Error'; + this.errMsg = 'An error occurred. Please try again.'; } } ); - } goaccount(){ } @@ -104,5 +154,17 @@ export class LoginPageComponent implements OnInit { this.router.navigate(["../forgotpass"], { relativeTo: this.route }); } + // Clear error when user starts typing + clearError() { + if (this.isError) { + this.isError = false; + this.errMsg = ''; + } + } + + // Toggle password visibility + togglePasswordVisibility() { + this.showPassword = !this.showPassword; + } } diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stepperworkflow/Stepper_workflow/Stepper_workflow.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stepperworkflow/Stepper_workflow/Stepper_workflow.component.ts index 8052672..56b2b42 100644 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stepperworkflow/Stepper_workflow/Stepper_workflow.component.ts +++ b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stepperworkflow/Stepper_workflow/Stepper_workflow.component.ts @@ -12,12 +12,6 @@ - - - - - - @@ -240,7 +234,8 @@ export class Stepper_workflowComponent implements OnInit { rsModaldescription = false; goToReplaceStringdescription(row) { - this.rowSelected = row; this.rsModaldescription = true; + this.rowSelected = row; + this.rsModaldescription = true; } @@ -253,6 +248,39 @@ export class Stepper_workflowComponent implements OnInit { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + this.router.navigate(["../demostepper/", id], { relativeTo: this.route }); + + + + } // updateaction diff --git a/frontend/angular-clarity-master/src/app/modules/main/admin/menuaccesscontrol/menuaccesscontrol.component.html b/frontend/angular-clarity-master/src/app/modules/main/admin/menuaccesscontrol/menuaccesscontrol.component.html index 88a4b66..fb96a15 100644 --- a/frontend/angular-clarity-master/src/app/modules/main/admin/menuaccesscontrol/menuaccesscontrol.component.html +++ b/frontend/angular-clarity-master/src/app/modules/main/admin/menuaccesscontrol/menuaccesscontrol.component.html @@ -1,279 +1,465 @@ -