Merge branch 'more' of https://git.hlcompany.ru/git/usersite into more
This commit is contained in:
commit
feeed2c640
@ -1,129 +1,131 @@
|
||||
{
|
||||
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"version": 1,
|
||||
"newProjectRoot": "projects",
|
||||
"projects": {
|
||||
"coffee-like-more": {
|
||||
"projectType": "application",
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"style": "scss"
|
||||
}
|
||||
},
|
||||
|
||||
"root": "",
|
||||
"sourceRoot": "src",
|
||||
"prefix": "app",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:browser",
|
||||
"options": {
|
||||
"outputPath": "/var/www/html/lk.crm4retail.ru/more",
|
||||
"baseHref": "/",
|
||||
"index": "src/index.html",
|
||||
"main": "src/main.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.app.json",
|
||||
"inlineStyleLanguage": "scss",
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/assets",
|
||||
"src/manifest.webmanifest",
|
||||
"src/firebase-messaging-sw.js",
|
||||
"src/sw-master.js",
|
||||
"src/sw-custom.js"
|
||||
],
|
||||
"styles": [
|
||||
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
|
||||
"node_modules/primeng/resources/themes/bootstrap4-light-blue/theme.css",
|
||||
"node_modules/primeicons/primeicons.css",
|
||||
"node_modules/primeng/resources/primeng.min.css",
|
||||
"node_modules/ngx-sharebuttons/themes/modern.scss",
|
||||
"node_modules/ngx-sharebuttons/themes/material.scss",
|
||||
"src/styles.scss"
|
||||
],
|
||||
"scripts": [],
|
||||
"serviceWorker": true,
|
||||
"ngswConfigPath": "ngsw-config.json"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "4mb",
|
||||
"maximumError": "5mb"
|
||||
},
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "2kb",
|
||||
"maximumError": "4kb"
|
||||
}
|
||||
],
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.prod.ts"
|
||||
}
|
||||
],
|
||||
"outputHashing": "all"
|
||||
},
|
||||
"development": {
|
||||
"buildOptimizer": false,
|
||||
"optimization": false,
|
||||
"vendorChunk": true,
|
||||
"extractLicenses": false,
|
||||
"sourceMap": true,
|
||||
"namedChunks": true
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "production"
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "coffee-like-more:build:production"
|
||||
},
|
||||
"development": {
|
||||
"browserTarget": "coffee-like-more:build:development",
|
||||
"proxyConfig": "proxy.confi.json"
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "development"
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "coffee-like-more:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "src/test.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.spec.json",
|
||||
"karmaConfig": "karma.conf.js",
|
||||
"inlineStyleLanguage": "scss",
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/firebase-messaging-sw.js",
|
||||
"src/assets",
|
||||
"src/manifest.webmanifest"
|
||||
],
|
||||
"styles": [
|
||||
"./node_modules/@angular/material/prebuilt-themes/purple-green.css",
|
||||
"src/styles.scss"
|
||||
],
|
||||
"scripts": []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"version": 1,
|
||||
"newProjectRoot": "projects",
|
||||
"projects": {
|
||||
"coffee-like-more": {
|
||||
"projectType": "application",
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"style": "scss"
|
||||
},
|
||||
"i18n": {
|
||||
"sourceLocale": "ru-RU"
|
||||
}
|
||||
},
|
||||
"root": "",
|
||||
"sourceRoot": "src",
|
||||
"prefix": "app",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:browser",
|
||||
"options": {
|
||||
"outputPath": "/var/www/html/lk.crm4retail.ru/more",
|
||||
"baseHref": "/",
|
||||
"index": "src/index.html",
|
||||
"main": "src/main.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.app.json",
|
||||
"inlineStyleLanguage": "scss",
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/assets",
|
||||
"src/manifest.webmanifest",
|
||||
"src/firebase-messaging-sw.js",
|
||||
"src/sw-master.js",
|
||||
"src/sw-custom.js"
|
||||
],
|
||||
"styles": [
|
||||
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
|
||||
"node_modules/primeng/resources/themes/bootstrap4-light-blue/theme.css",
|
||||
"node_modules/primeicons/primeicons.css",
|
||||
"node_modules/primeng/resources/primeng.min.css",
|
||||
"node_modules/ngx-sharebuttons/themes/modern.scss",
|
||||
"node_modules/ngx-sharebuttons/themes/material.scss",
|
||||
"src/styles.scss"
|
||||
],
|
||||
"scripts": [],
|
||||
"serviceWorker": true,
|
||||
"ngswConfigPath": "ngsw-config.json"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "4mb",
|
||||
"maximumError": "5mb"
|
||||
},
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "2kb",
|
||||
"maximumError": "4kb"
|
||||
}
|
||||
],
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.prod.ts"
|
||||
}
|
||||
],
|
||||
"outputHashing": "all"
|
||||
},
|
||||
"development": {
|
||||
"buildOptimizer": false,
|
||||
"optimization": false,
|
||||
"vendorChunk": true,
|
||||
"extractLicenses": false,
|
||||
"sourceMap": true,
|
||||
"namedChunks": true
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "production"
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "coffee-like-more:build:production"
|
||||
},
|
||||
"development": {
|
||||
"browserTarget": "coffee-like-more:build:development",
|
||||
"proxyConfig": "proxy.confi.json"
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "development"
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "coffee-like-more:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "src/test.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.spec.json",
|
||||
"karmaConfig": "karma.conf.js",
|
||||
"inlineStyleLanguage": "scss",
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/firebase-messaging-sw.js",
|
||||
"src/assets",
|
||||
"src/manifest.webmanifest"
|
||||
],
|
||||
"styles": [
|
||||
"./node_modules/@angular/material/prebuilt-themes/purple-green.css",
|
||||
"src/styles.scss"
|
||||
],
|
||||
"scripts": []
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"cli": {
|
||||
"analytics": false
|
||||
}
|
||||
},
|
||||
"cli": {
|
||||
"analytics": false
|
||||
}
|
||||
}
|
||||
|
||||
49
angular/package-lock.json
generated
49
angular/package-lock.json
generated
@ -16,6 +16,7 @@
|
||||
"@angular/fire": "^7.5.0",
|
||||
"@angular/forms": "^15.2.9",
|
||||
"@angular/material": "^15.2.9",
|
||||
"@angular/material-moment-adapter": "^15.2.9",
|
||||
"@angular/platform-browser": "^15.2.9",
|
||||
"@angular/platform-browser-dynamic": "^15.2.9",
|
||||
"@angular/router": "^15.2.9",
|
||||
@ -27,6 +28,7 @@
|
||||
"@types/uuid": "^8.3.4",
|
||||
"@types/web": "^0.0.99",
|
||||
"angular-moment-timezone": "^1.7.1",
|
||||
"angular2-text-mask": "^9.0.0",
|
||||
"barcode-2-svg": "^0.3.3",
|
||||
"firebase": "^9.9.3",
|
||||
"google-libphonenumber": "^3.2.30",
|
||||
@ -864,6 +866,19 @@
|
||||
"rxjs": "^6.5.3 || ^7.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@angular/material-moment-adapter": {
|
||||
"version": "15.2.9",
|
||||
"resolved": "https://registry.npmjs.org/@angular/material-moment-adapter/-/material-moment-adapter-15.2.9.tgz",
|
||||
"integrity": "sha512-DHG8z8DG1/+oO/bRC/k+1nXwRGg0qDsCEYulUoEUtpYmQRHj8Tid/9V2JiibYqTh4s0DJeAnx64CAO9K/k9EZg==",
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/core": "^15.0.0 || ^16.0.0",
|
||||
"@angular/material": "15.2.9",
|
||||
"moment": "^2.18.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@angular/platform-browser": {
|
||||
"version": "15.2.9",
|
||||
"resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-15.2.9.tgz",
|
||||
@ -5813,6 +5828,14 @@
|
||||
"resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.8.29.tgz",
|
||||
"integrity": "sha512-mla2acNCMkWXBD+c+yeUrBUrzOxYMNFdQ6FGfigGGtEVBPJx07BQeJekjt9DmH1FtZek4E9rE1eRR9qQpxACOQ=="
|
||||
},
|
||||
"node_modules/angular2-text-mask": {
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmjs.org/angular2-text-mask/-/angular2-text-mask-9.0.0.tgz",
|
||||
"integrity": "sha512-iALcnhJPS1zvX48d86rgUgDe/crX6XfhZrXC4Gdlo2/YwZW7u7KJZY6/b3ieSCIWVq/E6p+wDCzeo3E6leRjDA==",
|
||||
"dependencies": {
|
||||
"text-mask-core": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ansi-colors": {
|
||||
"version": "4.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz",
|
||||
@ -13564,6 +13587,11 @@
|
||||
"resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz",
|
||||
"integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg=="
|
||||
},
|
||||
"node_modules/text-mask-core": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/text-mask-core/-/text-mask-core-5.1.2.tgz",
|
||||
"integrity": "sha512-VfkCMdmRRZqXgQZFlDMiavm3hzsMzBM23CxHZsaeAYg66ZhXCNJWrFmnJwNy8KF9f74YvAUAuQenxsMCfuvhUw=="
|
||||
},
|
||||
"node_modules/text-table": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
|
||||
@ -15118,6 +15146,14 @@
|
||||
"tslib": "^2.3.0"
|
||||
}
|
||||
},
|
||||
"@angular/material-moment-adapter": {
|
||||
"version": "15.2.9",
|
||||
"resolved": "https://registry.npmjs.org/@angular/material-moment-adapter/-/material-moment-adapter-15.2.9.tgz",
|
||||
"integrity": "sha512-DHG8z8DG1/+oO/bRC/k+1nXwRGg0qDsCEYulUoEUtpYmQRHj8Tid/9V2JiibYqTh4s0DJeAnx64CAO9K/k9EZg==",
|
||||
"requires": {
|
||||
"tslib": "^2.3.0"
|
||||
}
|
||||
},
|
||||
"@angular/platform-browser": {
|
||||
"version": "15.2.9",
|
||||
"resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-15.2.9.tgz",
|
||||
@ -18959,6 +18995,14 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"angular2-text-mask": {
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmjs.org/angular2-text-mask/-/angular2-text-mask-9.0.0.tgz",
|
||||
"integrity": "sha512-iALcnhJPS1zvX48d86rgUgDe/crX6XfhZrXC4Gdlo2/YwZW7u7KJZY6/b3ieSCIWVq/E6p+wDCzeo3E6leRjDA==",
|
||||
"requires": {
|
||||
"text-mask-core": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"ansi-colors": {
|
||||
"version": "4.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz",
|
||||
@ -24763,6 +24807,11 @@
|
||||
"resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz",
|
||||
"integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg=="
|
||||
},
|
||||
"text-mask-core": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/text-mask-core/-/text-mask-core-5.1.2.tgz",
|
||||
"integrity": "sha512-VfkCMdmRRZqXgQZFlDMiavm3hzsMzBM23CxHZsaeAYg66ZhXCNJWrFmnJwNy8KF9f74YvAUAuQenxsMCfuvhUw=="
|
||||
},
|
||||
"text-table": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
"@angular/fire": "^7.5.0",
|
||||
"@angular/forms": "^15.2.9",
|
||||
"@angular/material": "^15.2.9",
|
||||
"@angular/material-moment-adapter": "^15.2.9",
|
||||
"@angular/platform-browser": "^15.2.9",
|
||||
"@angular/platform-browser-dynamic": "^15.2.9",
|
||||
"@angular/router": "^15.2.9",
|
||||
@ -29,6 +30,7 @@
|
||||
"@types/uuid": "^8.3.4",
|
||||
"@types/web": "^0.0.99",
|
||||
"angular-moment-timezone": "^1.7.1",
|
||||
"angular2-text-mask": "^9.0.0",
|
||||
"barcode-2-svg": "^0.3.3",
|
||||
"firebase": "^9.9.3",
|
||||
"google-libphonenumber": "^3.2.30",
|
||||
|
||||
@ -50,7 +50,6 @@ import {
|
||||
} from '@angular/material/bottom-sheet';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { DirectivesModule } from './directives/directives.module';
|
||||
import { MAT_DATE_LOCALE } from '@angular/material/core';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
@ -108,7 +107,7 @@ import { MAT_DATE_LOCALE } from '@angular/material/core';
|
||||
MatSnackBarModule,
|
||||
MatBottomSheetModule,
|
||||
MatProgressSpinnerModule,
|
||||
DirectivesModule
|
||||
DirectivesModule,
|
||||
],
|
||||
providers: [
|
||||
DialogService,
|
||||
@ -116,7 +115,6 @@ import { MAT_DATE_LOCALE } from '@angular/material/core';
|
||||
MessagingService,
|
||||
{ provide: MatBottomSheetRef, useValue: {} },
|
||||
{ provide: MAT_BOTTOM_SHEET_DATA, useValue: {} },
|
||||
{ provide: MAT_DATE_LOCALE, useValue: 'ru-RU' }
|
||||
],
|
||||
bootstrap: [AppComponent],
|
||||
})
|
||||
|
||||
@ -7,9 +7,7 @@ import { SocialMediaButtonsComponent } from './components/social-media-buttons/s
|
||||
import { NavbarComponent } from './components/navbar/navbar.component';
|
||||
import { MenuItemComponent } from './components/navbar/menu_item.component';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatDatepickerModule } from '@angular/material/datepicker';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { MatNativeDateModule } from '@angular/material/core';
|
||||
import { GuestCardComponent } from './pages/guest-card/guest-card.component';
|
||||
import { QrCodeModule } from 'ng-qrcode';
|
||||
import { AccordionComponent } from './components/accordion/accordion.component';
|
||||
@ -26,7 +24,7 @@ import { LoyalityProgramComponent } from './pages/loyality-program/loyality-prog
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { ToastModule } from 'primeng/toast';
|
||||
import { CreateUserComponent } from './pages/create_user/create_user.component';
|
||||
|
||||
import { TextMaskModule } from 'angular2-text-mask';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
@ -44,6 +42,7 @@ import { CreateUserComponent } from './pages/create_user/create_user.component';
|
||||
CreateUserComponent,
|
||||
],
|
||||
imports: [
|
||||
TextMaskModule,
|
||||
ToastModule,
|
||||
CommonModule,
|
||||
DefaultOptionRoutingModule,
|
||||
@ -57,9 +56,7 @@ import { CreateUserComponent } from './pages/create_user/create_user.component';
|
||||
MatInputModule,
|
||||
DirectivesModule,
|
||||
MatButtonModule,
|
||||
MatDatepickerModule,
|
||||
MatSelectModule,
|
||||
MatNativeDateModule,
|
||||
MatSelectModule,
|
||||
],
|
||||
bootstrap: [IndexComponent],
|
||||
})
|
||||
|
||||
@ -1,33 +1,31 @@
|
||||
<ng-container *ngIf="!authService.loading">
|
||||
<form
|
||||
(ngSubmit)="submit()"
|
||||
[formGroup]="form"
|
||||
>
|
||||
<div class="container center">
|
||||
<div class="form">
|
||||
<h1>Регистрация</h1>
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label>Ваше имя</mat-label>
|
||||
<input formControlName="name" matInput type="text" />
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label>Пол</mat-label>
|
||||
<mat-select formControlName="sex">
|
||||
<mat-option value="0">Не выбран</mat-option>
|
||||
<mat-option value="1">Мужчина</mat-option>
|
||||
<mat-option value="2">Женщина</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label>Дата рождения</mat-label>
|
||||
<input formControlName="date" matInput [matDatepicker]="picker">
|
||||
<mat-datepicker-toggle matIconSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<button mat-raised-button color="primary">Зарегистрироваться</button>
|
||||
<form
|
||||
(ngSubmit)="submit()"
|
||||
[formGroup]="form"
|
||||
>
|
||||
<div class="container center">
|
||||
<div class="form">
|
||||
<h1>Регистрация</h1>
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label>Ваше имя</mat-label>
|
||||
<input formControlName="name" matInput type="text" />
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label>Пол</mat-label>
|
||||
<mat-select formControlName="sex">
|
||||
<mat-option value="0">Не выбран</mat-option>
|
||||
<mat-option value="1">Мужчина</mat-option>
|
||||
<mat-option value="2">Женщина</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label>Дата рождения</mat-label>
|
||||
<input (click)="focusHandler($event)" (blur)="blurHandler()" formControlName="date" matInput [textMask]="mask" type="text" inputmode="numeric">
|
||||
</mat-form-field>
|
||||
<button mat-raised-button color="primary">Зарегистрироваться</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="authService.loading">
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
import { Component } from "@angular/core";
|
||||
import { FormControl, FormGroup, Validators } from "@angular/forms";
|
||||
import { MessageService } from "primeng/api";
|
||||
import { AuthService } from "src/app/services/auth.service";
|
||||
@ -9,22 +9,42 @@ import moment from 'moment';
|
||||
templateUrl: './create_user.component.html',
|
||||
styleUrls: ['./create_user.component.scss'],
|
||||
})
|
||||
export class CreateUserComponent implements OnInit {
|
||||
export class CreateUserComponent {
|
||||
public form = new FormGroup({
|
||||
name: new FormControl('', [Validators.required]),
|
||||
sex: new FormControl('', [Validators.required]),
|
||||
date: new FormControl('', [Validators.required]),
|
||||
});
|
||||
|
||||
public mask = {
|
||||
guide: true,
|
||||
showMask: true,
|
||||
mask: [/\d/, /\d/, '.', /\d/, /\d/, '.', /\d/, /\d/, /\d/, /\d/]
|
||||
};
|
||||
|
||||
constructor(
|
||||
public authService: AuthService,
|
||||
private messageService: MessageService,
|
||||
) { }
|
||||
|
||||
ngOnInit() { }
|
||||
focused = false;
|
||||
|
||||
focusHandler(e: any) {
|
||||
if (!this.focused) {
|
||||
setTimeout(() => {
|
||||
e.target.setSelectionRange(0, 0);
|
||||
}, 0);
|
||||
this.focused = true;
|
||||
}
|
||||
}
|
||||
|
||||
blurHandler() {
|
||||
this.focused = false;
|
||||
}
|
||||
|
||||
submit() {
|
||||
if (this.form.invalid) {
|
||||
this.messageService.clear();
|
||||
this.messageService.add({
|
||||
severity: 'error',
|
||||
summary: 'Введите имя, пол и дату рождения',
|
||||
@ -36,7 +56,7 @@ export class CreateUserComponent implements OnInit {
|
||||
const sex = this.form.value.sex!;
|
||||
const date = this.form.value.date!;
|
||||
|
||||
const formattedDate = moment(date).format('yyyy-MM-DD');
|
||||
const formattedDate = moment(date, 'DD-MM-YYYY').format('yyyy-MM-DD');
|
||||
|
||||
this.authService.register(name, sex, formattedDate);
|
||||
}
|
||||
|
||||
@ -16,8 +16,6 @@
|
||||
}
|
||||
.agree-info {
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
max-width: 80%;
|
||||
font-size: 12px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
@ -127,10 +127,10 @@ body {
|
||||
--main-color_hover: rgba(208, 180, 133, 0.2);
|
||||
}
|
||||
|
||||
.mdc-text-field--outlined:not(.mdc-text-field--disabled, .mdc-text-field--invalid) .mdc-notched-outline__leading,
|
||||
.mdc-text-field--outlined:not(.mdc-text-field--disabled, .mdc-text-field--invalid) .mdc-notched-outline__notch,
|
||||
.mdc-text-field--outlined:not(.mdc-text-field--disabled, .mdc-text-field--invalid) .mdc-notched-outline__trailing {
|
||||
border-color: var(--text-color_2);
|
||||
.mdc-text-field--outlined:not(.mdc-text-field--disabled, .mdc-text-field--invalid, .mat-focused) .mdc-notched-outline__leading,
|
||||
.mdc-text-field--outlined:not(.mdc-text-field--disabled, .mdc-text-field--invalid, .mat-focused) .mdc-notched-outline__notch,
|
||||
.mdc-text-field--outlined:not(.mdc-text-field--disabled, .mdc-text-field--invalid, .mat-focused) .mdc-notched-outline__trailing {
|
||||
border-color: var(--text-color_2) !important;
|
||||
}
|
||||
|
||||
.mat-mdc-outlined-button:not(:disabled) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user