mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-16 07:30:12 +01:00
prepare for sit. (docker)
This commit is contained in:
parent
311885894f
commit
8a39954811
39 changed files with 4819 additions and 1152 deletions
0
Dockerfile
Normal file
0
Dockerfile
Normal file
|
|
@ -1,6 +1,9 @@
|
|||
import { User } from './user';
|
||||
|
||||
export interface UserResponse {
|
||||
username: string,
|
||||
value: UserRole[],
|
||||
user: User;
|
||||
}
|
||||
|
||||
export interface UserRole {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
export interface User {
|
||||
username: string,
|
||||
password: string,
|
||||
export class User {
|
||||
username: string;
|
||||
password: string;
|
||||
}
|
||||
|
|
@ -5,23 +5,19 @@
|
|||
</a>
|
||||
<a class="logo" href="#" (click)="navigateHome()">symfonia</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header-container">
|
||||
<nb-select [selected]="currentTheme" (selectedChange)="changeTheme($event)" status="primary">
|
||||
<nb-option *ngFor="let theme of themes" [value]="theme.value"> {{ theme.name }}</nb-option>
|
||||
</nb-select>
|
||||
</div>
|
||||
|
||||
<div class="header-container">
|
||||
<nb-actions size="small">
|
||||
<nb-action class="control-item">
|
||||
<nb-search type="rotate-layout"></nb-search>
|
||||
</nb-action>
|
||||
<nb-action class="control-item" icon="bell-outline"></nb-action>
|
||||
<nb-action class="user-action" *nbIsGranted="['view', 'user']" >
|
||||
<nb-user [nbContextMenu]="userMenu"
|
||||
[onlyPicture]="userPictureOnly"
|
||||
[name]="user?.name"
|
||||
[picture]="user?.picture">
|
||||
<nb-action class="user-action" *nbIsGranted="['view', 'user']">
|
||||
<nb-user [nbContextMenu]="userMenu" [onlyPicture]="userPictureOnly" [name]="username">
|
||||
</nb-user>
|
||||
</nb-action>
|
||||
</nb-actions>
|
||||
</div>
|
||||
<button (click)="logout()" nbButton>
|
||||
Log Out
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -5,6 +5,9 @@ import { UserData } from '../../../@core/data/users';
|
|||
import { LayoutService } from '../../../@core/utils';
|
||||
import { map, takeUntil } from 'rxjs/operators';
|
||||
import { Subject } from 'rxjs';
|
||||
import { User } from '../../../@core/data/user';
|
||||
import { Router } from '@angular/router';
|
||||
import { LoginService } from '../../../auth/login.service';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-header',
|
||||
|
|
@ -15,7 +18,9 @@ export class HeaderComponent implements OnInit, OnDestroy {
|
|||
|
||||
private destroy$: Subject<void> = new Subject<void>();
|
||||
userPictureOnly: boolean = false;
|
||||
user: any;
|
||||
username: any;
|
||||
roles: any;
|
||||
userpicture: any;
|
||||
|
||||
themes = [
|
||||
{
|
||||
|
|
@ -38,22 +43,30 @@ export class HeaderComponent implements OnInit, OnDestroy {
|
|||
|
||||
currentTheme = 'default';
|
||||
|
||||
userMenu = [ { title: 'Profile' }, { title: 'Log out' } ];
|
||||
userMenu = [{ title: 'User Role(s)' }];
|
||||
|
||||
constructor(private sidebarService: NbSidebarService,
|
||||
private menuService: NbMenuService,
|
||||
private themeService: NbThemeService,
|
||||
private userService: UserData,
|
||||
private layoutService: LayoutService,
|
||||
private breakpointService: NbMediaBreakpointsService) {
|
||||
private router: Router,
|
||||
private menuService: NbMenuService,
|
||||
private themeService: NbThemeService,
|
||||
private layoutService: LayoutService,
|
||||
private loginService: LoginService,
|
||||
private breakpointService: NbMediaBreakpointsService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.currentTheme = this.themeService.currentTheme;
|
||||
|
||||
this.userService.getUsers()
|
||||
.pipe(takeUntil(this.destroy$))
|
||||
.subscribe((users: any) => this.user = users.nick);
|
||||
this.username = localStorage.getItem('username');
|
||||
this.roles = localStorage.getItem('roles');
|
||||
this.userpicture = 'assets/images/eva.png';
|
||||
|
||||
if (this.username == null) {
|
||||
this.router.navigate(['/auth/login']);
|
||||
}
|
||||
|
||||
this.username = this.username.replace(/['"]+/g, '');
|
||||
|
||||
this.currentTheme = this.themeService.currentTheme;
|
||||
|
||||
const { xl } = this.breakpointService.getBreakpointsMap();
|
||||
this.themeService.onMediaQueryChange()
|
||||
|
|
@ -71,6 +84,10 @@ export class HeaderComponent implements OnInit, OnDestroy {
|
|||
.subscribe(themeName => this.currentTheme = themeName);
|
||||
}
|
||||
|
||||
logout(){
|
||||
this.loginService.logout();
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.destroy$.next();
|
||||
this.destroy$.complete();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { ExtraOptions, RouterModule, Routes } from '@angular/router';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { AuthGuard } from './auth/AuthGuard';
|
||||
|
||||
export const routes: Routes = [
|
||||
{
|
||||
|
|
@ -7,8 +8,13 @@ export const routes: Routes = [
|
|||
loadChildren: () => import('./pages/pages.module')
|
||||
.then(m => m.PagesModule),
|
||||
},
|
||||
{ path: '', redirectTo: 'pages', pathMatch: 'full' },
|
||||
{ path: '**', redirectTo: 'pages' },
|
||||
{
|
||||
path: 'auth',
|
||||
loadChildren: () => import('./auth/login.module')
|
||||
.then(m => m.AuthModule),
|
||||
},
|
||||
{ path: '', redirectTo: 'auth/login', pathMatch: 'full' },
|
||||
{ path: '**', redirectTo: 'auth/login' },
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
|
|
|||
24
src/app/auth/AuthGuard.ts
Normal file
24
src/app/auth/AuthGuard.ts
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { LoginService } from './login.service';
|
||||
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class AuthGuard implements CanActivate {
|
||||
constructor(
|
||||
private router: Router,
|
||||
private accountService: LoginService
|
||||
) {}
|
||||
|
||||
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
|
||||
const user = this.accountService.userValue;
|
||||
if (user) {
|
||||
// authorised so return true
|
||||
return true;
|
||||
}
|
||||
|
||||
// not logged in so redirect to login page with the return url
|
||||
this.router.navigate(['/auth/login']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
53
src/app/auth/login.component.html
Normal file
53
src/app/auth/login.component.html
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<h1 id="title" class="title">Sign In</h1>
|
||||
|
||||
<nb-alert *ngIf="showMessages.error && errors?.length && !submitted" outline="danger" role="alert">
|
||||
<p class="alert-title"><b>Oh snap!</b></p>
|
||||
<ul class="alert-message-list">
|
||||
<li *ngFor="let error of errors" class="alert-message">{{ error }}</li>
|
||||
</ul>
|
||||
</nb-alert>
|
||||
|
||||
<nb-alert *ngIf="showMessages.success && messages?.length && !submitted" outline="success" role="alert">
|
||||
<p class="alert-title"><b>Hooray!</b></p>
|
||||
<ul class="alert-message-list">
|
||||
<li *ngFor="let message of messages" class="alert-message">{{ message }}</li>
|
||||
</ul>
|
||||
</nb-alert>
|
||||
|
||||
<div class="form-control-group">
|
||||
<label class="label" for="input-email">NIK:</label>
|
||||
<input nbInput fullWidth [(ngModel)]="user.username" #email="ngModel" name="nik" id="input-nik" placeholder="NIK"
|
||||
autofocus>
|
||||
<ng-container *ngIf="email.invalid && email.touched">
|
||||
<p class="caption status-danger" *ngIf="email.errors?.required">
|
||||
NIK is required!
|
||||
</p>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
<div class="form-control-group">
|
||||
<label class="label" for="input-password">Password:</label>
|
||||
<input nbInput fullWidth [(ngModel)]="user.password" #password="ngModel" name="password" type="password"
|
||||
id="input-password" placeholder="Password"
|
||||
[status]="password.dirty ? (password.invalid ? 'danger' : 'success') : 'basic'"
|
||||
[required]="getConfigValue('forms.validation.password.required')"
|
||||
[minlength]="getConfigValue('forms.validation.password.minLength')"
|
||||
[maxlength]="getConfigValue('forms.validation.password.maxLength')"
|
||||
[attr.aria-invalid]="password.invalid && password.touched ? true : null">
|
||||
<ng-container *ngIf="password.invalid && password.touched ">
|
||||
<p class="caption status-danger" *ngIf="password.errors?.required">
|
||||
Password is required!
|
||||
</p>
|
||||
<p class="caption status-danger" *ngIf="(password.errors?.minlength || password.errors?.maxlength)">
|
||||
Password should contains
|
||||
from {{ getConfigValue('forms.validation.password.minLength') }}
|
||||
to {{ getConfigValue('forms.validation.password.maxLength') }}
|
||||
characters
|
||||
</p>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
<button nbButton fullWidth (click)="onLogin()" status="success" [disabled]="submitted"
|
||||
[class.btn-pulse]="submitted">
|
||||
Sign In
|
||||
</button>
|
||||
84
src/app/auth/login.component.ts
Normal file
84
src/app/auth/login.component.ts
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
|
||||
/**
|
||||
* @license
|
||||
* Copyright Akveo. All Rights Reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*/
|
||||
import { Component, Input, ChangeDetectorRef, Inject } from '@angular/core';
|
||||
import { NbLoginComponent, NbAuthService, NB_AUTH_OPTIONS } from '@nebular/auth';
|
||||
import { User } from '../@core/data/user';
|
||||
import { Router } from '@angular/router';
|
||||
import { LoginService } from './login.service';
|
||||
import { UserResponse } from '../@core/data/user-response';
|
||||
import { NbComponentStatus, NbGlobalPosition, NbGlobalPhysicalPosition, NbToastrService } from '@nebular/theme';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-login',
|
||||
templateUrl: './login.component.html',
|
||||
})
|
||||
export class LoginComponent extends NbLoginComponent {
|
||||
|
||||
@Input() user: User;
|
||||
|
||||
index = 1;
|
||||
destroyByClick = true;
|
||||
duration = 2000;
|
||||
hasIcon = true;
|
||||
position: NbGlobalPosition = NbGlobalPhysicalPosition.TOP_RIGHT;
|
||||
preventDuplicates = false;
|
||||
status: NbComponentStatus = 'primary';
|
||||
|
||||
title = 'Login Symfonia';
|
||||
content = `Anda tidak mempunyai akses ke Symfonia`;
|
||||
|
||||
avail: boolean = false;
|
||||
|
||||
constructor(private toastrService: NbToastrService, private authService: LoginService, service: NbAuthService,
|
||||
@Inject(NB_AUTH_OPTIONS) options: {}, cd: ChangeDetectorRef, routes: Router) {
|
||||
super(service, options, cd, routes);
|
||||
}
|
||||
|
||||
onLogin() {
|
||||
this.authService.login(this.user).subscribe((res: UserResponse) => {
|
||||
if (res.username != null) {
|
||||
for (var i = 0; i < res.value.length; i++) {
|
||||
if
|
||||
(res.value[i].resourcealias == "IDM.Symfonia") {
|
||||
this.avail = true;
|
||||
}
|
||||
}
|
||||
if (this.avail) {
|
||||
this.router.navigate(['/pages/partner-price']);
|
||||
} else if (res.value.length == 0) {
|
||||
this.makeToast(this.content);
|
||||
}
|
||||
} else {
|
||||
this.makeToast("User tidak di temukan, atau password anda salah.");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
makeToast(cont: any) {
|
||||
this.showToast(this.status, this.title, cont);
|
||||
}
|
||||
|
||||
private showToast(type: NbComponentStatus, title: string, body: string) {
|
||||
const config = {
|
||||
status: type,
|
||||
destroyByClick: this.destroyByClick,
|
||||
duration: this.duration,
|
||||
hasIcon: this.hasIcon,
|
||||
position: this.position,
|
||||
preventDuplicates: this.preventDuplicates,
|
||||
};
|
||||
const titleContent = title ? `. ${title}` : '';
|
||||
|
||||
this.index += 1;
|
||||
this.toastrService.show(
|
||||
body,
|
||||
titleContent,
|
||||
config);
|
||||
}
|
||||
|
||||
}
|
||||
85
src/app/auth/login.service.ts
Normal file
85
src/app/auth/login.service.ts
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient, HttpErrorResponse, HttpHeaders } from '@angular/common/http';
|
||||
import { Observable, throwError, BehaviorSubject } from 'rxjs';
|
||||
import { map, catchError, tap } from 'rxjs/operators';
|
||||
import { UserResponse } from '../@core/data/user-response';
|
||||
import { User } from '../@core/data/user';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class LoginService {
|
||||
private userSubject: BehaviorSubject<User>;
|
||||
public user: Observable<User>;
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
private http: HttpClient) {
|
||||
this.userSubject = new BehaviorSubject<User>(JSON.parse(localStorage.getItem('user')));
|
||||
this.user = this.userSubject.asObservable();
|
||||
}
|
||||
|
||||
public get userValue(): User {
|
||||
return this.userSubject.value;
|
||||
}
|
||||
|
||||
login(user: User): Observable<any> {
|
||||
let url = 'http://34.87.6.140:8012/api/user/getAuthorization';
|
||||
|
||||
const headers = new HttpHeaders({
|
||||
'Content-Type': 'application/json',
|
||||
'X-Requested-Method': 'POST',
|
||||
});
|
||||
const options = { headers: headers };
|
||||
|
||||
console.log(JSON.stringify(user));
|
||||
console.log(url);
|
||||
|
||||
return this.http.post(url, JSON.stringify(user), options).pipe(
|
||||
map(this.extractData),
|
||||
catchError(this.handleError),
|
||||
tap(res => this.setSession(res)))
|
||||
}
|
||||
|
||||
logout() {
|
||||
// remove user from local storage and set current user to null
|
||||
localStorage.removeItem('username');
|
||||
localStorage.removeItem('roles');
|
||||
this.userSubject.next(null);
|
||||
this.router.navigate(['/auth/login']);
|
||||
}
|
||||
|
||||
public setSession(authResult) {
|
||||
// store user details and jwt token in local storage to keep user logged in between page refreshes
|
||||
localStorage.setItem('username', JSON.stringify(authResult.username));
|
||||
localStorage.setItem('roles', JSON.stringify(authResult.value));
|
||||
}
|
||||
|
||||
private extractData(body: any): UserResponse {
|
||||
console.log(JSON.stringify(body));
|
||||
let result: UserResponse;
|
||||
result = Object.assign(body);
|
||||
// this.userSubject.next(); pls find this
|
||||
// this.userSubject.next();
|
||||
return result;
|
||||
}
|
||||
|
||||
private handleError(error: HttpErrorResponse | any) {
|
||||
let errMsg: string;
|
||||
let errObj: any;
|
||||
|
||||
if (error instanceof HttpErrorResponse) {
|
||||
const err = error.message || JSON.stringify(error);
|
||||
errMsg = `${error.status} - ${error.statusText || ''} ${err}`;
|
||||
errObj = error.message;
|
||||
} else {
|
||||
errMsg = error.message ? error.message : error.toString();
|
||||
const body = error.message || '';
|
||||
errObj = body;
|
||||
}
|
||||
|
||||
return throwError(errObj);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
<h1 id="title" class="title">Sign In</h1>
|
||||
|
||||
<nb-alert *ngIf="showMessages.error && errors?.length && !submitted" outline="danger" role="alert">
|
||||
<p class="alert-title"><b>Oh snap!</b></p>
|
||||
<ul class="alert-message-list">
|
||||
<li *ngFor="let error of errors" class="alert-message">{{ error }}</li>
|
||||
</ul>
|
||||
</nb-alert>
|
||||
|
||||
<nb-alert *ngIf="showMessages.success && messages?.length && !submitted" outline="success" role="alert">
|
||||
<p class="alert-title"><b>Hooray!</b></p>
|
||||
<ul class="alert-message-list">
|
||||
<li *ngFor="let message of messages" class="alert-message">{{ message }}</li>
|
||||
</ul>
|
||||
</nb-alert>
|
||||
|
||||
<!-- (ngSubmit)="login()" -->
|
||||
<form #form="ngForm" aria-labelledby="title">
|
||||
|
||||
<div class="form-control-group">
|
||||
<label class="label" for="input-email">NIK:</label>
|
||||
<input nbInput fullWidth [(ngModel)]="user.email" #email="ngModel" name="nik" id="input-nik" placeholder="NIK"
|
||||
autofocus>
|
||||
<ng-container *ngIf="email.invalid && email.touched">
|
||||
<p class="caption status-danger" *ngIf="email.errors?.required">
|
||||
NIK is required!
|
||||
</p>
|
||||
<!-- <p class="caption status-danger" *ngIf="email.errors?.pattern">
|
||||
NIK should be the real one!
|
||||
</p> -->
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
<div class="form-control-group">
|
||||
<label class="label" for="input-password">Password:</label>
|
||||
<input nbInput fullWidth [(ngModel)]="user.password" #password="ngModel" name="password" type="password"
|
||||
id="input-password" placeholder="Password"
|
||||
[status]="password.dirty ? (password.invalid ? 'danger' : 'success') : 'basic'"
|
||||
[required]="getConfigValue('forms.validation.password.required')"
|
||||
[minlength]="getConfigValue('forms.validation.password.minLength')"
|
||||
[maxlength]="getConfigValue('forms.validation.password.maxLength')"
|
||||
[attr.aria-invalid]="password.invalid && password.touched ? true : null">
|
||||
<ng-container *ngIf="password.invalid && password.touched ">
|
||||
<p class="caption status-danger" *ngIf="password.errors?.required">
|
||||
Password is required!
|
||||
</p>
|
||||
<p class="caption status-danger" *ngIf="(password.errors?.minlength || password.errors?.maxlength)">
|
||||
Password should contains
|
||||
from {{ getConfigValue('forms.validation.password.minLength') }}
|
||||
to {{ getConfigValue('forms.validation.password.maxLength') }}
|
||||
characters
|
||||
</p>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-control-group accept-group">
|
||||
<nb-checkbox name="rememberMe" [(ngModel)]="user.rememberMe" *ngIf="rememberMe">Remember me</nb-checkbox>
|
||||
<a class="forgot-password" routerLink="../request-password">Forgot Password?</a>
|
||||
</div> -->
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<button nbButton fullWidth routerLink="pages" status="success" [disabled]="submitted || !form.valid"
|
||||
[class.btn-pulse]="submitted">
|
||||
Sign In
|
||||
</button>
|
||||
|
||||
<!-- <section *ngIf="socialLinks && socialLinks.length > 0" class="links" aria-label="Social sign in">
|
||||
Or connect with:
|
||||
<div class="socials">
|
||||
<ng-container *ngFor="let socialLink of socialLinks">
|
||||
<a *ngIf="socialLink.link"
|
||||
[attr.target]="socialLink.target"
|
||||
[attr.class]="socialLink.icon"
|
||||
[class.with-icon]="socialLink.icon">{{ socialLink.title }}</a>
|
||||
<a *ngIf="socialLink.url"
|
||||
[attr.href]="socialLink.url"
|
||||
[attr.target]="socialLink.target"
|
||||
[attr.class]="socialLink.icon"
|
||||
[class.with-icon]="socialLink.icon">{{ socialLink.title }}</a>
|
||||
</ng-container>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="another-action" aria-label="Register">
|
||||
Don't have an account? <a class="text-link" routerLink="../register">Sign Up</a>
|
||||
</section> -->
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
|
||||
/**
|
||||
* @license
|
||||
* Copyright Akveo. All Rights Reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*/
|
||||
import { Component } from '@angular/core';
|
||||
import { NbLoginComponent } from '@nebular/auth';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-login',
|
||||
templateUrl: './login.component.html',
|
||||
})
|
||||
export class LoginComponent extends NbLoginComponent {
|
||||
|
||||
}
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
|
||||
import { Observable, throwError } from 'rxjs';
|
||||
import { map, catchError, tap } from 'rxjs/operators';
|
||||
import { UserResponse } from '../../@core/data/user-response';
|
||||
import { User } from '../../@core/data/user';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class LoginService {
|
||||
constructor(private http: HttpClient) {
|
||||
}
|
||||
|
||||
login(user: User): Observable<any> {
|
||||
const url = 'http://10.170.3.190:8011/api/user/getAuthorization ';
|
||||
return this.http.post(url,JSON.stringify(user)).pipe(
|
||||
map(this.extractData),
|
||||
catchError(this.handleError),
|
||||
tap(res => this.setSession(res)),
|
||||
);
|
||||
}
|
||||
|
||||
public setSession(authResult) {
|
||||
localStorage.setItem('roles', authResult.value);
|
||||
localStorage.setItem('username', authResult.username);
|
||||
}
|
||||
|
||||
|
||||
private extractData(body: any): UserResponse {
|
||||
return Object.assign(body.promotionList);
|
||||
}
|
||||
|
||||
private handleError(error: HttpErrorResponse | any) {
|
||||
let errMsg: string;
|
||||
let errObj: any;
|
||||
|
||||
if (error instanceof HttpErrorResponse) {
|
||||
const err = error.message || JSON.stringify(error);
|
||||
errMsg = `${error.status} - ${error.statusText || ''} ${err}`;
|
||||
errObj = error.error.message;
|
||||
} else {
|
||||
errMsg = error.message ? error.message : error.toString();
|
||||
const body = error.message || '';
|
||||
errObj = body;
|
||||
}
|
||||
|
||||
return throwError(errObj);
|
||||
}
|
||||
}
|
||||
|
|
@ -31,10 +31,4 @@ export const MENU_ITEMS: NbMenuItem[] = [
|
|||
link: '/pages/partner-branch',
|
||||
home: false,
|
||||
},
|
||||
{
|
||||
title: 'Login Page',
|
||||
icon: 'keypad-outline',
|
||||
link: '/pages/auth',
|
||||
home: true,
|
||||
},
|
||||
];
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import {PromotionComponent} from './promotion/promotion.component';
|
|||
import { PartnerPriceComponent } from './partner-price/partner-price.component';
|
||||
import {BillingComponent} from './billing/billing.component';
|
||||
import {ServiceAgreementComponent} from './service-agreement/sa.component';
|
||||
import { LoginComponent } from './auth/login.component';
|
||||
|
||||
const routes: Routes = [{
|
||||
path: '',
|
||||
|
|
@ -33,10 +32,6 @@ const routes: Routes = [{
|
|||
path: 'billing',
|
||||
component: BillingComponent,
|
||||
},
|
||||
{
|
||||
path: 'auth',
|
||||
component: LoginComponent,
|
||||
},
|
||||
],
|
||||
}];
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
Service Agreement
|
||||
</nb-card-header>
|
||||
|
||||
<!-- (createConfirm)="onCreateConfirm($event)" (editConfirm)="onCreateConfirm($event)" -->
|
||||
<nb-card-body>
|
||||
<ng2-smart-table [settings]="settings" [source]="source" (deleteConfirm)="onDeleteConfirm($event)"
|
||||
(createConfirm)="onCreateConfirm($event)" (editConfirm)="onCreateConfirm($event)"
|
||||
(userRowSelect)="openWindowForm($event)">
|
||||
</ng2-smart-table>
|
||||
</nb-card-body>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
<div class="form-group">
|
||||
<label class="label">Bill Title</label>
|
||||
<nb-card-body>
|
||||
<nb-select [(selected)]="data.billTitle">
|
||||
<nb-select>
|
||||
<nb-option value="1">Invoice</nb-option>
|
||||
<nb-option value="2">Debit Note</nb-option>
|
||||
<nb-option value="3">Surat Perintah Penagihan</nb-option>
|
||||
|
|
@ -71,7 +71,7 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<label class="label">VAT</label>
|
||||
<input nbInput [(ngModel)]="data.vat"> %
|
||||
<input> %
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="label">Insurance</label>
|
||||
|
|
|
|||
394
symfonia/src/main/resources/static/auth-login-module-es2015.js
Normal file
394
symfonia/src/main/resources/static/auth-login-module-es2015.js
Normal file
|
|
@ -0,0 +1,394 @@
|
|||
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["auth-login-module"],{
|
||||
|
||||
/***/ "./src/app/@core/data/user.ts":
|
||||
/*!************************************!*\
|
||||
!*** ./src/app/@core/data/user.ts ***!
|
||||
\************************************/
|
||||
/*! exports provided: User */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "User", function() { return User; });
|
||||
class User {
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/app/auth/login-routing.module.ts":
|
||||
/*!**********************************************!*\
|
||||
!*** ./src/app/auth/login-routing.module.ts ***!
|
||||
\**********************************************/
|
||||
/*! exports provided: routes, AuthRoutingModule */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "routes", function() { return routes; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AuthRoutingModule", function() { return AuthRoutingModule; });
|
||||
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
||||
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
|
||||
/* harmony import */ var _nebular_auth__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @nebular/auth */ "./node_modules/@nebular/auth/__ivy_ngcc__/fesm2015/index.js");
|
||||
/* harmony import */ var _login_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./login.component */ "./src/app/auth/login.component.ts");
|
||||
/**
|
||||
* @license
|
||||
* Copyright Akveo. All Rights Reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '',
|
||||
component: _nebular_auth__WEBPACK_IMPORTED_MODULE_2__["NbAuthComponent"],
|
||||
children: [
|
||||
{
|
||||
path: 'login',
|
||||
component: _login_component__WEBPACK_IMPORTED_MODULE_3__["LoginComponent"],
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
class AuthRoutingModule {
|
||||
}
|
||||
AuthRoutingModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ type: AuthRoutingModule });
|
||||
AuthRoutingModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({ factory: function AuthRoutingModule_Factory(t) { return new (t || AuthRoutingModule)(); }, imports: [[_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"].forChild(routes)],
|
||||
_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]] });
|
||||
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsetNgModuleScope"](AuthRoutingModule, { imports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]], exports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]] }); })();
|
||||
/*@__PURE__*/ (function () { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](AuthRoutingModule, [{
|
||||
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
|
||||
args: [{
|
||||
imports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"].forChild(routes)],
|
||||
exports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]],
|
||||
}]
|
||||
}], null, null); })();
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/app/auth/login.component.ts":
|
||||
/*!*****************************************!*\
|
||||
!*** ./src/app/auth/login.component.ts ***!
|
||||
\*****************************************/
|
||||
/*! exports provided: LoginComponent */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoginComponent", function() { return LoginComponent; });
|
||||
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
||||
/* harmony import */ var _nebular_auth__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @nebular/auth */ "./node_modules/@nebular/auth/__ivy_ngcc__/fesm2015/index.js");
|
||||
/* harmony import */ var _core_data_user__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../@core/data/user */ "./src/app/@core/data/user.ts");
|
||||
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
|
||||
/* harmony import */ var _login_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./login.service */ "./src/app/auth/login.service.ts");
|
||||
/* harmony import */ var _nebular_theme__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @nebular/theme */ "./node_modules/@nebular/theme/__ivy_ngcc__/fesm2015/index.js");
|
||||
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
|
||||
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
|
||||
/**
|
||||
* @license
|
||||
* Copyright Akveo. All Rights Reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function LoginComponent_nb_alert_2_li_5_Template(rf, ctx) { if (rf & 1) {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "li", 16);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
} if (rf & 2) {
|
||||
const error_r79 = ctx.$implicit;
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate"](error_r79);
|
||||
} }
|
||||
function LoginComponent_nb_alert_2_Template(rf, ctx) { if (rf & 1) {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "nb-alert", 12);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](1, "p", 13);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](2, "b");
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](3, "Oh snap!");
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](4, "ul", 14);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](5, LoginComponent_nb_alert_2_li_5_Template, 2, 1, "li", 15);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
} if (rf & 2) {
|
||||
const ctx_r72 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](5);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngForOf", ctx_r72.errors);
|
||||
} }
|
||||
function LoginComponent_nb_alert_3_li_5_Template(rf, ctx) { if (rf & 1) {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "li", 16);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
} if (rf & 2) {
|
||||
const message_r81 = ctx.$implicit;
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate"](message_r81);
|
||||
} }
|
||||
function LoginComponent_nb_alert_3_Template(rf, ctx) { if (rf & 1) {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "nb-alert", 17);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](1, "p", 13);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](2, "b");
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](3, "Hooray!");
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](4, "ul", 14);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](5, LoginComponent_nb_alert_3_li_5_Template, 2, 1, "li", 15);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
} if (rf & 2) {
|
||||
const ctx_r73 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](5);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngForOf", ctx_r73.messages);
|
||||
} }
|
||||
function LoginComponent_ng_container_9_p_1_Template(rf, ctx) { if (rf & 1) {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "p", 19);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1, " NIK is required! ");
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
} }
|
||||
function LoginComponent_ng_container_9_Template(rf, ctx) { if (rf & 1) {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerStart"](0);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](1, LoginComponent_ng_container_9_p_1_Template, 2, 0, "p", 18);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerEnd"]();
|
||||
} if (rf & 2) {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();
|
||||
const _r74 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵreference"](8);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", _r74.errors == null ? null : _r74.errors.required);
|
||||
} }
|
||||
function LoginComponent_ng_container_15_p_1_Template(rf, ctx) { if (rf & 1) {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "p", 19);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1, " Password is required! ");
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
} }
|
||||
function LoginComponent_ng_container_15_p_2_Template(rf, ctx) { if (rf & 1) {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "p", 19);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
} if (rf & 2) {
|
||||
const ctx_r84 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](2);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate2"](" Password should contains from ", ctx_r84.getConfigValue("forms.validation.password.minLength"), " to ", ctx_r84.getConfigValue("forms.validation.password.maxLength"), " characters ");
|
||||
} }
|
||||
function LoginComponent_ng_container_15_Template(rf, ctx) { if (rf & 1) {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerStart"](0);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](1, LoginComponent_ng_container_15_p_1_Template, 2, 0, "p", 18);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](2, LoginComponent_ng_container_15_p_2_Template, 2, 2, "p", 18);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerEnd"]();
|
||||
} if (rf & 2) {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();
|
||||
const _r76 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵreference"](14);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", _r76.errors == null ? null : _r76.errors.required);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", (_r76.errors == null ? null : _r76.errors.minlength) || (_r76.errors == null ? null : _r76.errors.maxlength));
|
||||
} }
|
||||
class LoginComponent extends _nebular_auth__WEBPACK_IMPORTED_MODULE_1__["NbLoginComponent"] {
|
||||
constructor(toastrService, authService, service, options, cd, routes) {
|
||||
super(service, options, cd, routes);
|
||||
this.toastrService = toastrService;
|
||||
this.authService = authService;
|
||||
this.index = 1;
|
||||
this.destroyByClick = true;
|
||||
this.duration = 2000;
|
||||
this.hasIcon = true;
|
||||
this.position = _nebular_theme__WEBPACK_IMPORTED_MODULE_5__["NbGlobalPhysicalPosition"].TOP_RIGHT;
|
||||
this.preventDuplicates = false;
|
||||
this.status = 'primary';
|
||||
this.title = 'Login Symfonia';
|
||||
this.content = `Anda tidak mempunyai akses ke Symfonia`;
|
||||
this.avail = false;
|
||||
}
|
||||
onLogin() {
|
||||
this.authService.login(this.user).subscribe((res) => {
|
||||
if (res.username != null) {
|
||||
for (var i = 0; i < res.value.length; i++) {
|
||||
if (res.value[i].resourcealias == "IDM.Symfonia") {
|
||||
this.avail = true;
|
||||
}
|
||||
}
|
||||
if (this.avail) {
|
||||
this.router.navigate(['/pages/partner-price']);
|
||||
}
|
||||
else if (res.value.length == 0) {
|
||||
this.makeToast(this.content);
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.makeToast("User tidak di temukan, atau password anda salah.");
|
||||
}
|
||||
});
|
||||
}
|
||||
makeToast(cont) {
|
||||
this.showToast(this.status, this.title, cont);
|
||||
}
|
||||
showToast(type, title, body) {
|
||||
const config = {
|
||||
status: type,
|
||||
destroyByClick: this.destroyByClick,
|
||||
duration: this.duration,
|
||||
hasIcon: this.hasIcon,
|
||||
position: this.position,
|
||||
preventDuplicates: this.preventDuplicates,
|
||||
};
|
||||
const titleContent = title ? `. ${title}` : '';
|
||||
this.index += 1;
|
||||
this.toastrService.show(body, titleContent, config);
|
||||
}
|
||||
}
|
||||
LoginComponent.ɵfac = function LoginComponent_Factory(t) { return new (t || LoginComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_nebular_theme__WEBPACK_IMPORTED_MODULE_5__["NbToastrService"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_login_service__WEBPACK_IMPORTED_MODULE_4__["LoginService"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_nebular_auth__WEBPACK_IMPORTED_MODULE_1__["NbAuthService"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_nebular_auth__WEBPACK_IMPORTED_MODULE_1__["NB_AUTH_OPTIONS"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_router__WEBPACK_IMPORTED_MODULE_3__["Router"])); };
|
||||
LoginComponent.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ type: LoginComponent, selectors: [["ngx-login"]], inputs: { user: "user" }, features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]], decls: 18, vars: 14, consts: [["id", "title", 1, "title"], ["outline", "danger", "role", "alert", 4, "ngIf"], ["outline", "success", "role", "alert", 4, "ngIf"], [1, "form-control-group"], ["for", "input-email", 1, "label"], ["nbInput", "", "fullWidth", "", "name", "nik", "id", "input-nik", "placeholder", "NIK", "autofocus", "", 3, "ngModel", "ngModelChange"], ["email", "ngModel"], [4, "ngIf"], ["for", "input-password", 1, "label"], ["nbInput", "", "fullWidth", "", "name", "password", "type", "password", "id", "input-password", "placeholder", "Password", 3, "ngModel", "status", "required", "minlength", "maxlength", "ngModelChange"], ["password", "ngModel"], ["nbButton", "", "fullWidth", "", "status", "success", 3, "disabled", "click"], ["outline", "danger", "role", "alert"], [1, "alert-title"], [1, "alert-message-list"], ["class", "alert-message", 4, "ngFor", "ngForOf"], [1, "alert-message"], ["outline", "success", "role", "alert"], ["class", "caption status-danger", 4, "ngIf"], [1, "caption", "status-danger"]], template: function LoginComponent_Template(rf, ctx) { if (rf & 1) {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "h1", 0);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1, "Sign In");
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](2, LoginComponent_nb_alert_2_Template, 6, 1, "nb-alert", 1);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](3, LoginComponent_nb_alert_3_Template, 6, 1, "nb-alert", 2);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](4, "div", 3);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](5, "label", 4);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](6, "NIK:");
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](7, "input", 5, 6);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("ngModelChange", function LoginComponent_Template_input_ngModelChange_7_listener($event) { return ctx.user.username = $event; });
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](9, LoginComponent_ng_container_9_Template, 2, 1, "ng-container", 7);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](10, "div", 3);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](11, "label", 8);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](12, "Password:");
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](13, "input", 9, 10);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("ngModelChange", function LoginComponent_Template_input_ngModelChange_13_listener($event) { return ctx.user.password = $event; });
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](15, LoginComponent_ng_container_15_Template, 3, 2, "ng-container", 7);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](16, "button", 11);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function LoginComponent_Template_button_click_16_listener() { return ctx.onLogin(); });
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](17, " Sign In\n");
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
} if (rf & 2) {
|
||||
const _r74 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵreference"](8);
|
||||
const _r76 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵreference"](14);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.showMessages.error && (ctx.errors == null ? null : ctx.errors.length) && !ctx.submitted);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.showMessages.success && (ctx.messages == null ? null : ctx.messages.length) && !ctx.submitted);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](4);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngModel", ctx.user.username);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", _r74.invalid && _r74.touched);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](4);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngModel", ctx.user.password)("status", _r76.dirty ? _r76.invalid ? "danger" : "success" : "basic")("required", ctx.getConfigValue("forms.validation.password.required"))("minlength", ctx.getConfigValue("forms.validation.password.minLength"))("maxlength", ctx.getConfigValue("forms.validation.password.maxLength"));
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("aria-invalid", _r76.invalid && _r76.touched ? true : null);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", _r76.invalid && _r76.touched);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("btn-pulse", ctx.submitted);
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("disabled", ctx.submitted);
|
||||
} }, directives: [_angular_common__WEBPACK_IMPORTED_MODULE_6__["NgIf"], _nebular_theme__WEBPACK_IMPORTED_MODULE_5__["NbInputDirective"], _angular_forms__WEBPACK_IMPORTED_MODULE_7__["DefaultValueAccessor"], _angular_forms__WEBPACK_IMPORTED_MODULE_7__["NgControlStatus"], _angular_forms__WEBPACK_IMPORTED_MODULE_7__["NgModel"], _angular_forms__WEBPACK_IMPORTED_MODULE_7__["RequiredValidator"], _angular_forms__WEBPACK_IMPORTED_MODULE_7__["MinLengthValidator"], _angular_forms__WEBPACK_IMPORTED_MODULE_7__["MaxLengthValidator"], _nebular_theme__WEBPACK_IMPORTED_MODULE_5__["NbButtonComponent"], _nebular_theme__WEBPACK_IMPORTED_MODULE_5__["NbAlertComponent"], _angular_common__WEBPACK_IMPORTED_MODULE_6__["NgForOf"]], encapsulation: 2 });
|
||||
/*@__PURE__*/ (function () { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](LoginComponent, [{
|
||||
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"],
|
||||
args: [{
|
||||
selector: 'ngx-login',
|
||||
templateUrl: './login.component.html',
|
||||
}]
|
||||
}], function () { return [{ type: _nebular_theme__WEBPACK_IMPORTED_MODULE_5__["NbToastrService"] }, { type: _login_service__WEBPACK_IMPORTED_MODULE_4__["LoginService"] }, { type: _nebular_auth__WEBPACK_IMPORTED_MODULE_1__["NbAuthService"] }, { type: undefined, decorators: [{
|
||||
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
|
||||
args: [_nebular_auth__WEBPACK_IMPORTED_MODULE_1__["NB_AUTH_OPTIONS"]]
|
||||
}] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"] }, { type: _angular_router__WEBPACK_IMPORTED_MODULE_3__["Router"] }]; }, { user: [{
|
||||
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
|
||||
}] }); })();
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/app/auth/login.module.ts":
|
||||
/*!**************************************!*\
|
||||
!*** ./src/app/auth/login.module.ts ***!
|
||||
\**************************************/
|
||||
/*! exports provided: AuthModule */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AuthModule", function() { return AuthModule; });
|
||||
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
|
||||
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
||||
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
|
||||
/* harmony import */ var _nebular_auth__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @nebular/auth */ "./node_modules/@nebular/auth/__ivy_ngcc__/fesm2015/index.js");
|
||||
/* harmony import */ var _nebular_theme__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @nebular/theme */ "./node_modules/@nebular/theme/__ivy_ngcc__/fesm2015/index.js");
|
||||
/* harmony import */ var _login_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./login.component */ "./src/app/auth/login.component.ts");
|
||||
/* harmony import */ var _login_routing_module__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./login-routing.module */ "./src/app/auth/login-routing.module.ts");
|
||||
/**
|
||||
* @license
|
||||
* Copyright Akveo. All Rights Reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class AuthModule {
|
||||
}
|
||||
AuthModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineNgModule"]({ type: AuthModule });
|
||||
AuthModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjector"]({ factory: function AuthModule_Factory(t) { return new (t || AuthModule)(); }, imports: [[
|
||||
_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"],
|
||||
_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormsModule"],
|
||||
_nebular_theme__WEBPACK_IMPORTED_MODULE_4__["NbAlertModule"],
|
||||
_nebular_theme__WEBPACK_IMPORTED_MODULE_4__["NbInputModule"],
|
||||
_nebular_theme__WEBPACK_IMPORTED_MODULE_4__["NbButtonModule"],
|
||||
_nebular_theme__WEBPACK_IMPORTED_MODULE_4__["NbCheckboxModule"],
|
||||
_login_routing_module__WEBPACK_IMPORTED_MODULE_6__["AuthRoutingModule"],
|
||||
_nebular_auth__WEBPACK_IMPORTED_MODULE_3__["NbAuthModule"],
|
||||
]] });
|
||||
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵsetNgModuleScope"](AuthModule, { declarations: [_login_component__WEBPACK_IMPORTED_MODULE_5__["LoginComponent"]], imports: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"],
|
||||
_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormsModule"],
|
||||
_nebular_theme__WEBPACK_IMPORTED_MODULE_4__["NbAlertModule"],
|
||||
_nebular_theme__WEBPACK_IMPORTED_MODULE_4__["NbInputModule"],
|
||||
_nebular_theme__WEBPACK_IMPORTED_MODULE_4__["NbButtonModule"],
|
||||
_nebular_theme__WEBPACK_IMPORTED_MODULE_4__["NbCheckboxModule"],
|
||||
_login_routing_module__WEBPACK_IMPORTED_MODULE_6__["AuthRoutingModule"],
|
||||
_nebular_auth__WEBPACK_IMPORTED_MODULE_3__["NbAuthModule"]] }); })();
|
||||
/*@__PURE__*/ (function () { _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](AuthModule, [{
|
||||
type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"],
|
||||
args: [{
|
||||
imports: [
|
||||
_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"],
|
||||
_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormsModule"],
|
||||
_nebular_theme__WEBPACK_IMPORTED_MODULE_4__["NbAlertModule"],
|
||||
_nebular_theme__WEBPACK_IMPORTED_MODULE_4__["NbInputModule"],
|
||||
_nebular_theme__WEBPACK_IMPORTED_MODULE_4__["NbButtonModule"],
|
||||
_nebular_theme__WEBPACK_IMPORTED_MODULE_4__["NbCheckboxModule"],
|
||||
_login_routing_module__WEBPACK_IMPORTED_MODULE_6__["AuthRoutingModule"],
|
||||
_nebular_auth__WEBPACK_IMPORTED_MODULE_3__["NbAuthModule"],
|
||||
],
|
||||
declarations: [
|
||||
_login_component__WEBPACK_IMPORTED_MODULE_5__["LoginComponent"],
|
||||
],
|
||||
}]
|
||||
}], null, null); })();
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
//# sourceMappingURL=auth-login-module-es2015.js.map
|
||||
File diff suppressed because one or more lines are too long
737
symfonia/src/main/resources/static/auth-login-module-es5.js
Normal file
737
symfonia/src/main/resources/static/auth-login-module-es5.js
Normal file
|
|
@ -0,0 +1,737 @@
|
|||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||
|
||||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["auth-login-module"], {
|
||||
/***/
|
||||
"./src/app/@core/data/user.ts":
|
||||
/*!************************************!*\
|
||||
!*** ./src/app/@core/data/user.ts ***!
|
||||
\************************************/
|
||||
|
||||
/*! exports provided: User */
|
||||
|
||||
/***/
|
||||
function srcAppCoreDataUserTs(module, __webpack_exports__, __webpack_require__) {
|
||||
"use strict";
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */
|
||||
|
||||
|
||||
__webpack_require__.d(__webpack_exports__, "User", function () {
|
||||
return User;
|
||||
});
|
||||
|
||||
var User = function User() {
|
||||
_classCallCheck(this, User);
|
||||
};
|
||||
/***/
|
||||
|
||||
},
|
||||
|
||||
/***/
|
||||
"./src/app/auth/login-routing.module.ts":
|
||||
/*!**********************************************!*\
|
||||
!*** ./src/app/auth/login-routing.module.ts ***!
|
||||
\**********************************************/
|
||||
|
||||
/*! exports provided: routes, AuthRoutingModule */
|
||||
|
||||
/***/
|
||||
function srcAppAuthLoginRoutingModuleTs(module, __webpack_exports__, __webpack_require__) {
|
||||
"use strict";
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */
|
||||
|
||||
|
||||
__webpack_require__.d(__webpack_exports__, "routes", function () {
|
||||
return routes;
|
||||
});
|
||||
/* harmony export (binding) */
|
||||
|
||||
|
||||
__webpack_require__.d(__webpack_exports__, "AuthRoutingModule", function () {
|
||||
return AuthRoutingModule;
|
||||
});
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! @angular/core */
|
||||
"./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
||||
/*! @angular/router */
|
||||
"./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _nebular_auth__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! @nebular/auth */
|
||||
"./node_modules/@nebular/auth/__ivy_ngcc__/fesm2015/index.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _login_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! ./login.component */
|
||||
"./src/app/auth/login.component.ts");
|
||||
/**
|
||||
* @license
|
||||
* Copyright Akveo. All Rights Reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*/
|
||||
|
||||
|
||||
var routes = [{
|
||||
path: '',
|
||||
component: _nebular_auth__WEBPACK_IMPORTED_MODULE_2__["NbAuthComponent"],
|
||||
children: [{
|
||||
path: 'login',
|
||||
component: _login_component__WEBPACK_IMPORTED_MODULE_3__["LoginComponent"]
|
||||
}]
|
||||
}];
|
||||
|
||||
var AuthRoutingModule = function AuthRoutingModule() {
|
||||
_classCallCheck(this, AuthRoutingModule);
|
||||
};
|
||||
|
||||
AuthRoutingModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({
|
||||
type: AuthRoutingModule
|
||||
});
|
||||
AuthRoutingModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({
|
||||
factory: function AuthRoutingModule_Factory(t) {
|
||||
return new (t || AuthRoutingModule)();
|
||||
},
|
||||
imports: [[_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"].forChild(routes)], _angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]]
|
||||
});
|
||||
|
||||
(function () {
|
||||
(typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsetNgModuleScope"](AuthRoutingModule, {
|
||||
imports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]],
|
||||
exports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]]
|
||||
});
|
||||
})();
|
||||
/*@__PURE__*/
|
||||
|
||||
|
||||
(function () {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](AuthRoutingModule, [{
|
||||
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
|
||||
args: [{
|
||||
imports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"].forChild(routes)],
|
||||
exports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]]
|
||||
}]
|
||||
}], null, null);
|
||||
})();
|
||||
/***/
|
||||
|
||||
},
|
||||
|
||||
/***/
|
||||
"./src/app/auth/login.component.ts":
|
||||
/*!*****************************************!*\
|
||||
!*** ./src/app/auth/login.component.ts ***!
|
||||
\*****************************************/
|
||||
|
||||
/*! exports provided: LoginComponent */
|
||||
|
||||
/***/
|
||||
function srcAppAuthLoginComponentTs(module, __webpack_exports__, __webpack_require__) {
|
||||
"use strict";
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */
|
||||
|
||||
|
||||
__webpack_require__.d(__webpack_exports__, "LoginComponent", function () {
|
||||
return LoginComponent;
|
||||
});
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! @angular/core */
|
||||
"./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _nebular_auth__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
||||
/*! @nebular/auth */
|
||||
"./node_modules/@nebular/auth/__ivy_ngcc__/fesm2015/index.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _core_data_user__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ../@core/data/user */
|
||||
"./src/app/@core/data/user.ts");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _angular_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! @angular/router */
|
||||
"./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _login_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
||||
/*! ./login.service */
|
||||
"./src/app/auth/login.service.ts");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _nebular_theme__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
||||
/*! @nebular/theme */
|
||||
"./node_modules/@nebular/theme/__ivy_ngcc__/fesm2015/index.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _angular_common__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
||||
/*! @angular/common */
|
||||
"./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _angular_forms__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
||||
/*! @angular/forms */
|
||||
"./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
|
||||
/**
|
||||
* @license
|
||||
* Copyright Akveo. All Rights Reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*/
|
||||
|
||||
|
||||
function LoginComponent_nb_alert_2_li_5_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "li", 16);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
}
|
||||
|
||||
if (rf & 2) {
|
||||
var error_r79 = ctx.$implicit;
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate"](error_r79);
|
||||
}
|
||||
}
|
||||
|
||||
function LoginComponent_nb_alert_2_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "nb-alert", 12);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](1, "p", 13);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](2, "b");
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](3, "Oh snap!");
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](4, "ul", 14);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](5, LoginComponent_nb_alert_2_li_5_Template, 2, 1, "li", 15);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
}
|
||||
|
||||
if (rf & 2) {
|
||||
var ctx_r72 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](5);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngForOf", ctx_r72.errors);
|
||||
}
|
||||
}
|
||||
|
||||
function LoginComponent_nb_alert_3_li_5_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "li", 16);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
}
|
||||
|
||||
if (rf & 2) {
|
||||
var message_r81 = ctx.$implicit;
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate"](message_r81);
|
||||
}
|
||||
}
|
||||
|
||||
function LoginComponent_nb_alert_3_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "nb-alert", 17);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](1, "p", 13);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](2, "b");
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](3, "Hooray!");
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](4, "ul", 14);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](5, LoginComponent_nb_alert_3_li_5_Template, 2, 1, "li", 15);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
}
|
||||
|
||||
if (rf & 2) {
|
||||
var ctx_r73 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](5);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngForOf", ctx_r73.messages);
|
||||
}
|
||||
}
|
||||
|
||||
function LoginComponent_ng_container_9_p_1_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "p", 19);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1, " NIK is required! ");
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
}
|
||||
}
|
||||
|
||||
function LoginComponent_ng_container_9_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerStart"](0);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](1, LoginComponent_ng_container_9_p_1_Template, 2, 0, "p", 18);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerEnd"]();
|
||||
}
|
||||
|
||||
if (rf & 2) {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();
|
||||
|
||||
var _r74 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵreference"](8);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", _r74.errors == null ? null : _r74.errors.required);
|
||||
}
|
||||
}
|
||||
|
||||
function LoginComponent_ng_container_15_p_1_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "p", 19);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1, " Password is required! ");
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
}
|
||||
}
|
||||
|
||||
function LoginComponent_ng_container_15_p_2_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "p", 19);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
}
|
||||
|
||||
if (rf & 2) {
|
||||
var ctx_r84 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](2);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate2"](" Password should contains from ", ctx_r84.getConfigValue("forms.validation.password.minLength"), " to ", ctx_r84.getConfigValue("forms.validation.password.maxLength"), " characters ");
|
||||
}
|
||||
}
|
||||
|
||||
function LoginComponent_ng_container_15_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerStart"](0);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](1, LoginComponent_ng_container_15_p_1_Template, 2, 0, "p", 18);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](2, LoginComponent_ng_container_15_p_2_Template, 2, 2, "p", 18);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerEnd"]();
|
||||
}
|
||||
|
||||
if (rf & 2) {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();
|
||||
|
||||
var _r76 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵreference"](14);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", _r76.errors == null ? null : _r76.errors.required);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", (_r76.errors == null ? null : _r76.errors.minlength) || (_r76.errors == null ? null : _r76.errors.maxlength));
|
||||
}
|
||||
}
|
||||
|
||||
var LoginComponent =
|
||||
/*#__PURE__*/
|
||||
function (_nebular_auth__WEBPAC) {
|
||||
_inherits(LoginComponent, _nebular_auth__WEBPAC);
|
||||
|
||||
function LoginComponent(toastrService, authService, service, options, cd, routes) {
|
||||
var _this;
|
||||
|
||||
_classCallCheck(this, LoginComponent);
|
||||
|
||||
_this = _possibleConstructorReturn(this, _getPrototypeOf(LoginComponent).call(this, service, options, cd, routes));
|
||||
_this.toastrService = toastrService;
|
||||
_this.authService = authService;
|
||||
_this.index = 1;
|
||||
_this.destroyByClick = true;
|
||||
_this.duration = 2000;
|
||||
_this.hasIcon = true;
|
||||
_this.position = _nebular_theme__WEBPACK_IMPORTED_MODULE_5__["NbGlobalPhysicalPosition"].TOP_RIGHT;
|
||||
_this.preventDuplicates = false;
|
||||
_this.status = 'primary';
|
||||
_this.title = 'Login Symfonia';
|
||||
_this.content = "Anda tidak mempunyai akses ke Symfonia";
|
||||
_this.avail = false;
|
||||
return _this;
|
||||
}
|
||||
|
||||
_createClass(LoginComponent, [{
|
||||
key: "onLogin",
|
||||
value: function onLogin() {
|
||||
var _this2 = this;
|
||||
|
||||
this.authService.login(this.user).subscribe(function (res) {
|
||||
if (res.username != null) {
|
||||
for (var i = 0; i < res.value.length; i++) {
|
||||
if (res.value[i].resourcealias == "IDM.Symfonia") {
|
||||
_this2.avail = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (_this2.avail) {
|
||||
_this2.router.navigate(['/pages/partner-price']);
|
||||
} else if (res.value.length == 0) {
|
||||
_this2.makeToast(_this2.content);
|
||||
}
|
||||
} else {
|
||||
_this2.makeToast("User tidak di temukan, atau password anda salah.");
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "makeToast",
|
||||
value: function makeToast(cont) {
|
||||
this.showToast(this.status, this.title, cont);
|
||||
}
|
||||
}, {
|
||||
key: "showToast",
|
||||
value: function showToast(type, title, body) {
|
||||
var config = {
|
||||
status: type,
|
||||
destroyByClick: this.destroyByClick,
|
||||
duration: this.duration,
|
||||
hasIcon: this.hasIcon,
|
||||
position: this.position,
|
||||
preventDuplicates: this.preventDuplicates
|
||||
};
|
||||
var titleContent = title ? ". ".concat(title) : '';
|
||||
this.index += 1;
|
||||
this.toastrService.show(body, titleContent, config);
|
||||
}
|
||||
}]);
|
||||
|
||||
return LoginComponent;
|
||||
}(_nebular_auth__WEBPACK_IMPORTED_MODULE_1__["NbLoginComponent"]);
|
||||
|
||||
LoginComponent.ɵfac = function LoginComponent_Factory(t) {
|
||||
return new (t || LoginComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_nebular_theme__WEBPACK_IMPORTED_MODULE_5__["NbToastrService"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_login_service__WEBPACK_IMPORTED_MODULE_4__["LoginService"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_nebular_auth__WEBPACK_IMPORTED_MODULE_1__["NbAuthService"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_nebular_auth__WEBPACK_IMPORTED_MODULE_1__["NB_AUTH_OPTIONS"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_router__WEBPACK_IMPORTED_MODULE_3__["Router"]));
|
||||
};
|
||||
|
||||
LoginComponent.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({
|
||||
type: LoginComponent,
|
||||
selectors: [["ngx-login"]],
|
||||
inputs: {
|
||||
user: "user"
|
||||
},
|
||||
features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]],
|
||||
decls: 18,
|
||||
vars: 14,
|
||||
consts: [["id", "title", 1, "title"], ["outline", "danger", "role", "alert", 4, "ngIf"], ["outline", "success", "role", "alert", 4, "ngIf"], [1, "form-control-group"], ["for", "input-email", 1, "label"], ["nbInput", "", "fullWidth", "", "name", "nik", "id", "input-nik", "placeholder", "NIK", "autofocus", "", 3, "ngModel", "ngModelChange"], ["email", "ngModel"], [4, "ngIf"], ["for", "input-password", 1, "label"], ["nbInput", "", "fullWidth", "", "name", "password", "type", "password", "id", "input-password", "placeholder", "Password", 3, "ngModel", "status", "required", "minlength", "maxlength", "ngModelChange"], ["password", "ngModel"], ["nbButton", "", "fullWidth", "", "status", "success", 3, "disabled", "click"], ["outline", "danger", "role", "alert"], [1, "alert-title"], [1, "alert-message-list"], ["class", "alert-message", 4, "ngFor", "ngForOf"], [1, "alert-message"], ["outline", "success", "role", "alert"], ["class", "caption status-danger", 4, "ngIf"], [1, "caption", "status-danger"]],
|
||||
template: function LoginComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "h1", 0);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1, "Sign In");
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](2, LoginComponent_nb_alert_2_Template, 6, 1, "nb-alert", 1);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](3, LoginComponent_nb_alert_3_Template, 6, 1, "nb-alert", 2);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](4, "div", 3);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](5, "label", 4);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](6, "NIK:");
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](7, "input", 5, 6);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("ngModelChange", function LoginComponent_Template_input_ngModelChange_7_listener($event) {
|
||||
return ctx.user.username = $event;
|
||||
});
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](9, LoginComponent_ng_container_9_Template, 2, 1, "ng-container", 7);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](10, "div", 3);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](11, "label", 8);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](12, "Password:");
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](13, "input", 9, 10);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("ngModelChange", function LoginComponent_Template_input_ngModelChange_13_listener($event) {
|
||||
return ctx.user.password = $event;
|
||||
});
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](15, LoginComponent_ng_container_15_Template, 3, 2, "ng-container", 7);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](16, "button", 11);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function LoginComponent_Template_button_click_16_listener() {
|
||||
return ctx.onLogin();
|
||||
});
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](17, " Sign In\n");
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
||||
}
|
||||
|
||||
if (rf & 2) {
|
||||
var _r74 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵreference"](8);
|
||||
|
||||
var _r76 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵreference"](14);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.showMessages.error && (ctx.errors == null ? null : ctx.errors.length) && !ctx.submitted);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.showMessages.success && (ctx.messages == null ? null : ctx.messages.length) && !ctx.submitted);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](4);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngModel", ctx.user.username);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", _r74.invalid && _r74.touched);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](4);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngModel", ctx.user.password)("status", _r76.dirty ? _r76.invalid ? "danger" : "success" : "basic")("required", ctx.getConfigValue("forms.validation.password.required"))("minlength", ctx.getConfigValue("forms.validation.password.minLength"))("maxlength", ctx.getConfigValue("forms.validation.password.maxLength"));
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("aria-invalid", _r76.invalid && _r76.touched ? true : null);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", _r76.invalid && _r76.touched);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("btn-pulse", ctx.submitted);
|
||||
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("disabled", ctx.submitted);
|
||||
}
|
||||
},
|
||||
directives: [_angular_common__WEBPACK_IMPORTED_MODULE_6__["NgIf"], _nebular_theme__WEBPACK_IMPORTED_MODULE_5__["NbInputDirective"], _angular_forms__WEBPACK_IMPORTED_MODULE_7__["DefaultValueAccessor"], _angular_forms__WEBPACK_IMPORTED_MODULE_7__["NgControlStatus"], _angular_forms__WEBPACK_IMPORTED_MODULE_7__["NgModel"], _angular_forms__WEBPACK_IMPORTED_MODULE_7__["RequiredValidator"], _angular_forms__WEBPACK_IMPORTED_MODULE_7__["MinLengthValidator"], _angular_forms__WEBPACK_IMPORTED_MODULE_7__["MaxLengthValidator"], _nebular_theme__WEBPACK_IMPORTED_MODULE_5__["NbButtonComponent"], _nebular_theme__WEBPACK_IMPORTED_MODULE_5__["NbAlertComponent"], _angular_common__WEBPACK_IMPORTED_MODULE_6__["NgForOf"]],
|
||||
encapsulation: 2
|
||||
});
|
||||
/*@__PURE__*/
|
||||
|
||||
(function () {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](LoginComponent, [{
|
||||
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"],
|
||||
args: [{
|
||||
selector: 'ngx-login',
|
||||
templateUrl: './login.component.html'
|
||||
}]
|
||||
}], function () {
|
||||
return [{
|
||||
type: _nebular_theme__WEBPACK_IMPORTED_MODULE_5__["NbToastrService"]
|
||||
}, {
|
||||
type: _login_service__WEBPACK_IMPORTED_MODULE_4__["LoginService"]
|
||||
}, {
|
||||
type: _nebular_auth__WEBPACK_IMPORTED_MODULE_1__["NbAuthService"]
|
||||
}, {
|
||||
type: undefined,
|
||||
decorators: [{
|
||||
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
|
||||
args: [_nebular_auth__WEBPACK_IMPORTED_MODULE_1__["NB_AUTH_OPTIONS"]]
|
||||
}]
|
||||
}, {
|
||||
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"]
|
||||
}, {
|
||||
type: _angular_router__WEBPACK_IMPORTED_MODULE_3__["Router"]
|
||||
}];
|
||||
}, {
|
||||
user: [{
|
||||
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
|
||||
}]
|
||||
});
|
||||
})();
|
||||
/***/
|
||||
|
||||
},
|
||||
|
||||
/***/
|
||||
"./src/app/auth/login.module.ts":
|
||||
/*!**************************************!*\
|
||||
!*** ./src/app/auth/login.module.ts ***!
|
||||
\**************************************/
|
||||
|
||||
/*! exports provided: AuthModule */
|
||||
|
||||
/***/
|
||||
function srcAppAuthLoginModuleTs(module, __webpack_exports__, __webpack_require__) {
|
||||
"use strict";
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */
|
||||
|
||||
|
||||
__webpack_require__.d(__webpack_exports__, "AuthModule", function () {
|
||||
return AuthModule;
|
||||
});
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! @angular/common */
|
||||
"./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
||||
/*! @angular/core */
|
||||
"./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! @angular/forms */
|
||||
"./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _nebular_auth__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! @nebular/auth */
|
||||
"./node_modules/@nebular/auth/__ivy_ngcc__/fesm2015/index.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _nebular_theme__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
||||
/*! @nebular/theme */
|
||||
"./node_modules/@nebular/theme/__ivy_ngcc__/fesm2015/index.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _login_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
||||
/*! ./login.component */
|
||||
"./src/app/auth/login.component.ts");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _login_routing_module__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
||||
/*! ./login-routing.module */
|
||||
"./src/app/auth/login-routing.module.ts");
|
||||
/**
|
||||
* @license
|
||||
* Copyright Akveo. All Rights Reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*/
|
||||
|
||||
|
||||
var AuthModule = function AuthModule() {
|
||||
_classCallCheck(this, AuthModule);
|
||||
};
|
||||
|
||||
AuthModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineNgModule"]({
|
||||
type: AuthModule
|
||||
});
|
||||
AuthModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjector"]({
|
||||
factory: function AuthModule_Factory(t) {
|
||||
return new (t || AuthModule)();
|
||||
},
|
||||
imports: [[_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormsModule"], _nebular_theme__WEBPACK_IMPORTED_MODULE_4__["NbAlertModule"], _nebular_theme__WEBPACK_IMPORTED_MODULE_4__["NbInputModule"], _nebular_theme__WEBPACK_IMPORTED_MODULE_4__["NbButtonModule"], _nebular_theme__WEBPACK_IMPORTED_MODULE_4__["NbCheckboxModule"], _login_routing_module__WEBPACK_IMPORTED_MODULE_6__["AuthRoutingModule"], _nebular_auth__WEBPACK_IMPORTED_MODULE_3__["NbAuthModule"]]]
|
||||
});
|
||||
|
||||
(function () {
|
||||
(typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵsetNgModuleScope"](AuthModule, {
|
||||
declarations: [_login_component__WEBPACK_IMPORTED_MODULE_5__["LoginComponent"]],
|
||||
imports: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormsModule"], _nebular_theme__WEBPACK_IMPORTED_MODULE_4__["NbAlertModule"], _nebular_theme__WEBPACK_IMPORTED_MODULE_4__["NbInputModule"], _nebular_theme__WEBPACK_IMPORTED_MODULE_4__["NbButtonModule"], _nebular_theme__WEBPACK_IMPORTED_MODULE_4__["NbCheckboxModule"], _login_routing_module__WEBPACK_IMPORTED_MODULE_6__["AuthRoutingModule"], _nebular_auth__WEBPACK_IMPORTED_MODULE_3__["NbAuthModule"]]
|
||||
});
|
||||
})();
|
||||
/*@__PURE__*/
|
||||
|
||||
|
||||
(function () {
|
||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](AuthModule, [{
|
||||
type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"],
|
||||
args: [{
|
||||
imports: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormsModule"], _nebular_theme__WEBPACK_IMPORTED_MODULE_4__["NbAlertModule"], _nebular_theme__WEBPACK_IMPORTED_MODULE_4__["NbInputModule"], _nebular_theme__WEBPACK_IMPORTED_MODULE_4__["NbButtonModule"], _nebular_theme__WEBPACK_IMPORTED_MODULE_4__["NbCheckboxModule"], _login_routing_module__WEBPACK_IMPORTED_MODULE_6__["AuthRoutingModule"], _nebular_auth__WEBPACK_IMPORTED_MODULE_3__["NbAuthModule"]],
|
||||
declarations: [_login_component__WEBPACK_IMPORTED_MODULE_5__["LoginComponent"]]
|
||||
}]
|
||||
}], null, null);
|
||||
})();
|
||||
/***/
|
||||
|
||||
}
|
||||
}]);
|
||||
//# sourceMappingURL=auth-login-module-es5.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -64,7 +64,7 @@
|
|||
/******/
|
||||
/******/ // script path function
|
||||
/******/ function jsonpScriptSrc(chunkId) {
|
||||
/******/ return __webpack_require__.p + "" + ({"pages-pages-module":"pages-pages-module"}[chunkId]||chunkId) + "-es2015.js"
|
||||
/******/ return __webpack_require__.p + "" + ({"auth-login-module":"auth-login-module","pages-pages-module":"pages-pages-module"}[chunkId]||chunkId) + "-es2015.js"
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // The require function
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -64,7 +64,7 @@
|
|||
/******/
|
||||
/******/ // script path function
|
||||
/******/ function jsonpScriptSrc(chunkId) {
|
||||
/******/ return __webpack_require__.p + "" + ({"pages-pages-module":"pages-pages-module"}[chunkId]||chunkId) + "-es5.js"
|
||||
/******/ return __webpack_require__.p + "" + ({"auth-login-module":"auth-login-module","pages-pages-module":"pages-pages-module"}[chunkId]||chunkId) + "-es5.js"
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // The require function
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue