diff --git a/package-lock.json b/package-lock.json index 9750268..57e34ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,6 +29,7 @@ "@ng-bootstrap/ng-bootstrap": "^13.1.1", "@popperjs/core": "^2.11.6", "@swimlane/ngx-charts": "^20.1.0", + "@vercel/analytics": "^1.0.0", "ag-grid-angular": "^27.3.0", "ag-grid-community": "^27.3.0", "angular-count-to": "0.0.3", @@ -4765,6 +4766,14 @@ "@types/node": "*" } }, + "node_modules/@vercel/analytics": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@vercel/analytics/-/analytics-1.0.0.tgz", + "integrity": "sha512-RQmj7pv82JwGDHrnKeRc6TtSw2U7rWNubc2IH0ernTzWTj02yr9zvIYiYJeztsBzrJtWv7m8Nz6vxxb+cdEtJw==", + "peerDependencies": { + "react": "^16.8||^17||^18" + } + }, "node_modules/@webassemblyjs/ast": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", @@ -10212,6 +10221,18 @@ "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "peer": true, + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -12581,6 +12602,18 @@ "node": ">= 0.8" } }, + "node_modules/react": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/read-package-json": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-6.0.0.tgz", @@ -18735,6 +18768,12 @@ "@types/node": "*" } }, + "@vercel/analytics": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@vercel/analytics/-/analytics-1.0.0.tgz", + "integrity": "sha512-RQmj7pv82JwGDHrnKeRc6TtSw2U7rWNubc2IH0ernTzWTj02yr9zvIYiYJeztsBzrJtWv7m8Nz6vxxb+cdEtJw==", + "requires": {} + }, "@webassemblyjs/ast": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", @@ -22987,6 +23026,15 @@ "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "peer": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, "lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -24770,6 +24818,15 @@ "unpipe": "1.0.0" } }, + "react": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "peer": true, + "requires": { + "loose-envify": "^1.1.0" + } + }, "read-package-json": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-6.0.0.tgz", diff --git a/package.json b/package.json index e608ef4..89fde69 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "@ng-bootstrap/ng-bootstrap": "^13.1.1", "@popperjs/core": "^2.11.6", "@swimlane/ngx-charts": "^20.1.0", + "@vercel/analytics": "^1.0.0", "ag-grid-angular": "^27.3.0", "ag-grid-community": "^27.3.0", "angular-count-to": "0.0.3", diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 0e949ad..bd29bf1 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -11,12 +11,9 @@ import { SharedModule } from './shared/shared.module'; import { ProductsModule } from './components/products/products.module'; import { SalesModule } from './components/sales/sales.module'; import { CouponsModule } from './components/coupons/coupons.module'; -import { PagesModule } from './components/pages/pages.module'; -import { MediaModule } from './components/media/media.module'; import { MenusModule } from './components/menus/menus.module'; import { VendorsModule } from './components/vendors/vendors.module'; import { UsersModule } from './components/users/users.module'; -import { LocalizationModule } from './components/localization/localization.module'; import { AccountModule } from './components/account/account.module'; import { SettingModule } from './components/setting/setting.module'; import { ReportsModule } from './components/reports/reports.module'; @@ -43,14 +40,10 @@ import { AuthInterceptor } from "./shared/inceptor/auth-interceptor"; ReportsModule, AuthModule, SharedModule, - LocalizationModule, ProductsModule, SalesModule, - // NgImageSliderModule, VendorsModule, CouponsModule, - PagesModule, - MediaModule, MenusModule, UsersModule, AgGridModule, diff --git a/src/app/components/auth/auth.module.ts b/src/app/components/auth/auth.module.ts index bd3148e..fe8670a 100644 --- a/src/app/components/auth/auth.module.ts +++ b/src/app/components/auth/auth.module.ts @@ -1,5 +1,7 @@ import { NgModule } from "@angular/core"; import { CommonModule } from "@angular/common"; +import { environment } from "../../../environments/environment"; +import firebase from 'firebase/compat/app'; import { AuthRoutingModule } from "./auth-routing.module"; import { LoginComponent } from "./login/login.component"; @@ -15,6 +17,8 @@ import { SendEmailComponent } from './send-email/send-email.component'; import { EmailVerifiedComponent } from './email-verified/email-verified.component'; import { EmailNotVerifiedComponent } from './email-not-verified/email-not-verified.component'; +firebase.initializeApp(environment.firebaseConfig); + @NgModule({ declarations: [LoginComponent, SignupComponent, ForbiddenComponent, ResetPasswordComponent, SendEmailComponent, EmailVerifiedComponent, EmailNotVerifiedComponent], imports: [ @@ -24,6 +28,6 @@ import { EmailNotVerifiedComponent } from './email-not-verified/email-not-verifi CarouselModule, SharedModule, NgbModule, - FormsModule], + FormsModule] }) export class AuthModule { } diff --git a/src/app/components/auth/login/login.component.html b/src/app/components/auth/login/login.component.html index b656482..f82fad1 100644 --- a/src/app/components/auth/login/login.component.html +++ b/src/app/components/auth/login/login.component.html @@ -147,13 +147,15 @@
-
- -->
-
diff --git a/src/app/components/auth/signup/signup.component.html b/src/app/components/auth/signup/signup.component.html index 579aa36..64b23f5 100644 --- a/src/app/components/auth/signup/signup.component.html +++ b/src/app/components/auth/signup/signup.component.html @@ -21,12 +21,12 @@
- - * Họ và tên
- +
Vui lòng không được bỏ trống @@ -61,7 +62,8 @@
- +
Vui lòng không được bỏ trống @@ -78,7 +80,8 @@
- +
Vui lòng không được bỏ @@ -92,9 +95,9 @@
-
- +
+
Vui lòng không được bỏ @@ -103,6 +106,25 @@ đa 10 số
+
+ +
+
+ +
+
+ + +
+
+ +
+
+
+
+
@@ -111,8 +133,8 @@
- +
@@ -123,14 +145,15 @@
- +
- +
- +
Vui lòng không được bỏ @@ -150,8 +173,10 @@
- + @@ -164,12 +189,12 @@
-
+
- @@ -189,7 +214,7 @@
- @@ -216,8 +241,9 @@
- + @@ -272,11 +298,11 @@
- - +
-
-
-
-
-
-
Currency Details
-
-
-
-
- - - - - - - - - - - - - - - - - - - -
Currency TitleUSDCodeExchange RateActions
- {{item.title}} - - {{item.usd}} - {{item.code}}{{item.rate}} -   - -
-
-
-
-
-
-
-
- \ No newline at end of file diff --git a/src/app/components/localization/rates/rates.component.scss b/src/app/components/localization/rates/rates.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/components/localization/rates/rates.component.ts b/src/app/components/localization/rates/rates.component.ts deleted file mode 100644 index 106a9c6..0000000 --- a/src/app/components/localization/rates/rates.component.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { DecimalPipe } from '@angular/common'; -import { Component, OnInit, QueryList, ViewChildren } from '@angular/core'; -import { Observable } from 'rxjs'; -import { NgbdSortableHeader, SortEvent } from 'src/app/shared/directives/NgbdSortableHeader'; -import { TableService } from 'src/app/shared/service/table.service'; -import { RateDB, RATEDB } from '../../../shared/tables/rate'; - -@Component({ - selector: 'app-rates', - templateUrl: './rates.component.html', - styleUrls: ['./rates.component.scss'], - providers: [TableService, DecimalPipe] -}) -export class RatesComponent implements OnInit { - - public tableItem$: Observable; - public searchText; - total$: Observable; - - constructor(public service: TableService) { - this.tableItem$ = service.tableItem$; - this.total$ = service.total$; - this.service.setUserData(RATEDB) - } - - @ViewChildren(NgbdSortableHeader) headers: QueryList; - - onSort({ column, direction }: SortEvent) { - // resetting other headers - this.headers.forEach((header) => { - if (header.sortable !== column) { - header.direction = ''; - } - }); - - this.service.sortColumn = column; - this.service.sortDirection = direction; - - } - - - - ngOnInit() { - } - -} diff --git a/src/app/components/localization/taxes/taxes.component.html b/src/app/components/localization/taxes/taxes.component.html deleted file mode 100644 index 8a843f5..0000000 --- a/src/app/components/localization/taxes/taxes.component.html +++ /dev/null @@ -1,46 +0,0 @@ - -
-
-
-
-
-
Tax Details
-
-
-
-
- - - - - - - - - - - - - - - - - - - -
Currency TitleUSDCodeExchange RateActions
- {{item.detail}} - - {{item.tax_schedule}} - {{item.rate}}{{item.total_amount}} -   - -
-
-
-
-
-
-
-
- \ No newline at end of file diff --git a/src/app/components/localization/taxes/taxes.component.scss b/src/app/components/localization/taxes/taxes.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/components/localization/taxes/taxes.component.ts b/src/app/components/localization/taxes/taxes.component.ts deleted file mode 100644 index 1eabc1a..0000000 --- a/src/app/components/localization/taxes/taxes.component.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { DecimalPipe } from '@angular/common'; -import { Component, OnInit, QueryList, ViewChildren } from '@angular/core'; -import { Observable } from 'rxjs'; -import { NgbdSortableHeader, SortEvent } from 'src/app/shared/directives/NgbdSortableHeader'; -import { TableService } from 'src/app/shared/service/table.service'; -import { TaxesDB, TAXESDB } from '../../../shared/tables/taxes'; - -@Component({ - selector: 'app-taxes', - templateUrl: './taxes.component.html', - styleUrls: ['./taxes.component.scss'], - providers: [TableService, DecimalPipe] -}) -export class TaxesComponent implements OnInit { - public tableItem$: Observable; - public searchText; - total$: Observable; - - constructor(public service: TableService) { - this.tableItem$ = service.tableItem$; - this.total$ = service.total$; - this.service.setUserData(TAXESDB) - } - - @ViewChildren(NgbdSortableHeader) headers: QueryList; - - onSort({ column, direction }: SortEvent) { - // resetting other headers - this.headers.forEach((header) => { - if (header.sortable !== column) { - header.direction = ''; - } - }); - - this.service.sortColumn = column; - this.service.sortDirection = direction; - - } - - ngOnInit() { - } - -} diff --git a/src/app/components/localization/translations/translations.component.html b/src/app/components/localization/translations/translations.component.html deleted file mode 100644 index a9af77d..0000000 --- a/src/app/components/localization/translations/translations.component.html +++ /dev/null @@ -1,51 +0,0 @@ - -
-
-
-
-
-
Translations
-
-
-
-
- - - - - - - - - - - - - - - - - - - -
User KeyRussianArbicEnglishActions
- {{item.user_key}} - - {{item.russian}} - {{item.arabic}}{{item.english}} -   - -
-
- - -
-
-
-
-
-
-
-
- \ No newline at end of file diff --git a/src/app/components/localization/translations/translations.component.scss b/src/app/components/localization/translations/translations.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/components/localization/translations/translations.component.ts b/src/app/components/localization/translations/translations.component.ts deleted file mode 100644 index bbf8687..0000000 --- a/src/app/components/localization/translations/translations.component.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { DecimalPipe } from '@angular/common'; -import { Component, OnInit, QueryList, ViewChildren } from '@angular/core'; -import { Observable } from 'rxjs'; -import { NgbdSortableHeader, SortEvent } from 'src/app/shared/directives/NgbdSortableHeader'; -import { TableService } from 'src/app/shared/service/table.service'; -import { TRANSLATIONDB, TranslationsDB } from '../../../shared/tables/translations'; - -@Component({ - selector: 'app-translations', - templateUrl: './translations.component.html', - styleUrls: ['./translations.component.scss'], - providers: [TableService, DecimalPipe] -}) -export class TranslationsComponent implements OnInit { - - public tableItem$: Observable; - public searchText; - total$: Observable; - - constructor(public service: TableService) { - this.tableItem$ = service.tableItem$; - this.total$ = service.total$; - this.service.setUserData(TRANSLATIONDB) - } - - @ViewChildren(NgbdSortableHeader) headers: QueryList; - - onSort({ column, direction }: SortEvent) { - // resetting other headers - this.headers.forEach((header) => { - if (header.sortable !== column) { - header.direction = ''; - } - }); - - this.service.sortColumn = column; - this.service.sortDirection = direction; - - } - - - ngOnInit() { - } - -} diff --git a/src/app/components/media/media-routing.module.ts b/src/app/components/media/media-routing.module.ts deleted file mode 100644 index 6a9cad8..0000000 --- a/src/app/components/media/media-routing.module.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; -import { MediaComponent } from './media/media.component'; - -const routes: Routes = [ - { - path: '', - children: [ - { - path: '', - component: MediaComponent, - data: { - title: "Media", - breadcrumb: "Media" - } - } - ] - } -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] -}) -export class MediaRoutingModule { } diff --git a/src/app/components/media/media.module.ts b/src/app/components/media/media.module.ts deleted file mode 100644 index 97c27e2..0000000 --- a/src/app/components/media/media.module.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { MediaRoutingModule } from './media-routing.module'; -import { MediaComponent } from './media/media.component'; -import { NgxDropzoneModule } from 'ngx-dropzone'; -import { SharedModule } from 'src/app/shared/shared.module'; -import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; - - -@NgModule({ - declarations: [MediaComponent], - imports: [ - CommonModule, - MediaRoutingModule, - NgxDropzoneModule, - SharedModule, - NgbModule - ] -}) -export class MediaModule { } diff --git a/src/app/components/media/media/media.component.html b/src/app/components/media/media/media.component.html deleted file mode 100644 index 9504b21..0000000 --- a/src/app/components/media/media/media.component.html +++ /dev/null @@ -1,67 +0,0 @@ - -
-
-
-
Dropzone Media
-
-
-
- - -
- -

Drop files here or click to upload.

-
-
- - {{ f.name }} ({{ f.type }}) - -
-
-
-
- -
-
-
Media File List
-
-
-
-
- - - - - - - - - - - - - - - - - - -
ActionsImageFile NameURL
-   - - - - - {{item.file_name}} - {{item.url}}
-
- - -
-
-
-
-
-
- \ No newline at end of file diff --git a/src/app/components/media/media/media.component.scss b/src/app/components/media/media/media.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/components/media/media/media.component.ts b/src/app/components/media/media/media.component.ts deleted file mode 100644 index 675e489..0000000 --- a/src/app/components/media/media/media.component.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { DecimalPipe } from '@angular/common'; -import { Component, OnInit, QueryList, ViewChildren } from '@angular/core'; -import { DropzoneConfigInterface } from 'ngx-dropzone-wrapper'; -import { Observable } from 'rxjs'; -import { NgbdSortableHeader, SortEvent } from 'src/app/shared/directives/NgbdSortableHeader'; -import { TableService } from 'src/app/shared/service/table.service'; -import { MediaDB, MEDIADB } from 'src/app/shared/tables/media'; - -@Component({ - selector: 'app-media', - templateUrl: './media.component.html', - styleUrls: ['./media.component.scss'], - providers: [TableService, DecimalPipe] -}) -export class MediaComponent implements OnInit { - - public tableItem$: Observable; - public searchText; - total$: Observable; - - constructor(public service: TableService) { - this.tableItem$ = service.tableItem$; - this.total$ = service.total$; - this.service.setUserData(MEDIADB) - } - - @ViewChildren(NgbdSortableHeader) headers: QueryList; - - onSort({ column, direction }: SortEvent) { - // resetting other headers - this.headers.forEach((header) => { - if (header.sortable !== column) { - header.direction = ''; - } - }); - - this.service.sortColumn = column; - this.service.sortDirection = direction; - - } - - files: File[] = []; - - onSelect(event) { - this.files.push(...event.addedFiles); - } - - onRemove(event) { - this.files.splice(this.files.indexOf(event), 1); - } - - ngOnInit() { - } - -} diff --git a/src/app/components/pages/create-page/create-page.component.html b/src/app/components/pages/create-page/create-page.component.html deleted file mode 100644 index a650f4d..0000000 --- a/src/app/components/pages/create-page/create-page.component.html +++ /dev/null @@ -1,79 +0,0 @@ - -
-
-
-
Add Page
-
-
- -
-
- -
-
-
-
- \ No newline at end of file diff --git a/src/app/components/pages/create-page/create-page.component.scss b/src/app/components/pages/create-page/create-page.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/components/pages/create-page/create-page.component.ts b/src/app/components/pages/create-page/create-page.component.ts deleted file mode 100644 index 90776c0..0000000 --- a/src/app/components/pages/create-page/create-page.component.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms'; - -@Component({ - selector: 'app-create-page', - templateUrl: './create-page.component.html', - styleUrls: ['./create-page.component.scss'] -}) -export class CreatePageComponent implements OnInit { - public generalForm: UntypedFormGroup; - public seoForm: UntypedFormGroup; - public active = 1; - - constructor(private formBuilder: UntypedFormBuilder) { - this.createGeneralForm(); - this.createSeoForm(); - } - - createGeneralForm() { - this.generalForm = this.formBuilder.group({ - name: [''], - desc: [''], - status: [''] - }) - } - createSeoForm() { - this.seoForm = this.formBuilder.group({ - title: [''], - keyword: [''], - meta_desc: [''] - }) - } - - ngOnInit() { - } - -} diff --git a/src/app/components/pages/list-page/list-page.component.html b/src/app/components/pages/list-page/list-page.component.html deleted file mode 100644 index 3c4315c..0000000 --- a/src/app/components/pages/list-page/list-page.component.html +++ /dev/null @@ -1,43 +0,0 @@ - -
-
-
-
-
-
Page Details
-
-
-
- -
- - - - - - - - - - - - - - - - - -
NameStatusCreated On
- {{ item.name }}{{item.created_on}}
-
- - -
-
-
-
-
-
-
- \ No newline at end of file diff --git a/src/app/components/pages/list-page/list-page.component.scss b/src/app/components/pages/list-page/list-page.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/components/pages/list-page/list-page.component.ts b/src/app/components/pages/list-page/list-page.component.ts deleted file mode 100644 index bbbacf8..0000000 --- a/src/app/components/pages/list-page/list-page.component.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { DecimalPipe } from '@angular/common'; -import { Component, OnInit, QueryList, ViewChildren } from '@angular/core'; -import { Observable } from 'rxjs'; -import { NgbdSortableHeader, SortEvent } from 'src/app/shared/directives/NgbdSortableHeader'; -import { TableService } from 'src/app/shared/service/table.service'; -import { LISTPAGEDB, ListPagesDB } from 'src/app/shared/tables/list-pages'; - -@Component({ - selector: 'app-list-page', - templateUrl: './list-page.component.html', - styleUrls: ['./list-page.component.scss'], - providers: [TableService, DecimalPipe] -}) -export class ListPageComponent implements OnInit { - public selected = []; - public tableItem$: Observable; - public searchText; - total$: Observable; - - constructor(public service: TableService) { - this.tableItem$ = service.tableItem$; - this.total$ = service.total$; - this.service.setUserData(LISTPAGEDB) - } - - @ViewChildren(NgbdSortableHeader) headers: QueryList; - - onSort({ column, direction }: SortEvent) { - // resetting other headers - this.headers.forEach((header) => { - if (header.sortable !== column) { - header.direction = ''; - } - }); - - this.service.sortColumn = column; - this.service.sortDirection = direction; - - } - - onSelect({ selected }) { - this.selected.splice(0, this.selected.length); - this.selected.push(...selected); - } - - ngOnInit() { - } - -} diff --git a/src/app/components/pages/pages-routing.module.ts b/src/app/components/pages/pages-routing.module.ts deleted file mode 100644 index ba8772a..0000000 --- a/src/app/components/pages/pages-routing.module.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { NgModule, Component } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; -import { ListPageComponent } from './list-page/list-page.component'; -import { CreatePageComponent } from './create-page/create-page.component'; - -const routes: Routes = [ - { - path: '', - children: [ - { - path: 'list-page', - component: ListPageComponent, - data: { - title: "List Page", - breadcrumb: "List Page" - } - }, - { - path: 'create-page', - component: CreatePageComponent, - data: { - title: "Create Page", - breadcrumb: "Create Page" - } - } - ] - } -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] -}) -export class PagesRoutingModule { } diff --git a/src/app/components/pages/pages.module.ts b/src/app/components/pages/pages.module.ts deleted file mode 100644 index a799a54..0000000 --- a/src/app/components/pages/pages.module.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; -import { ReactiveFormsModule } from '@angular/forms'; -import { PagesRoutingModule } from './pages-routing.module'; -import { ListPageComponent } from './list-page/list-page.component'; -import { CreatePageComponent } from './create-page/create-page.component'; -import { SharedModule } from 'src/app/shared/shared.module'; - -@NgModule({ - declarations: [ListPageComponent, CreatePageComponent], - imports: [ - CommonModule, - PagesRoutingModule, - NgbModule, - ReactiveFormsModule, - SharedModule - ] -}) -export class PagesModule { } diff --git a/src/app/components/sales/scam-orders/scam-orders.component.html b/src/app/components/sales/scam-orders/scam-orders.component.html index a96d2c1..b631055 100644 --- a/src/app/components/sales/scam-orders/scam-orders.component.html +++ b/src/app/components/sales/scam-orders/scam-orders.component.html @@ -8,10 +8,10 @@
-->
-
+ @@ -23,14 +23,15 @@ - + - + -
Phương thức Trạng thái Số tiền
{{ order.orderTrackingNumber }} {{ order.orderTime }}{{ order.user.fullName }}{{ order.user.fullName + }} {{ order?.shipper?.user?.fullName }} {{ order.total | currency : "VND" }} +
diff --git a/src/app/components/sales/scam-orders/scam-orders.component.scss b/src/app/components/sales/scam-orders/scam-orders.component.scss index e69de29..8b1c6b2 100644 --- a/src/app/components/sales/scam-orders/scam-orders.component.scss +++ b/src/app/components/sales/scam-orders/scam-orders.component.scss @@ -0,0 +1,63 @@ +th, +td { + text-align: center; +} + +.modal-change-status { + + // width: 1000px; + .modal-confirm-text { + text-align: center; + padding: 20px 8px; + font-weight: 600; + } + + .modal-select-option { + display: flex; + justify-content: center; + align-items: center; + margin-bottom: 20px; + + select { + padding: 12px 20px; + } + } + + .modal-btn-option { + width: 100%; + display: flex; + justify-content: space-around; + align-items: center; + padding-bottom: 20px; + + .width-btn { + width: 110px; + } + } +} + +.modal-confirm-delete { + + // width: 1000px; + .modal-confirm-text { + text-align: center; + padding: 20px 8px; + font-weight: 600; + } + + .modal-btn-option { + width: 100%; + display: flex; + justify-content: space-around; + align-items: center; + padding-bottom: 20px; + + .width-btn { + width: 110px; + } + } +} + +.modal-confirm-text { + font-weight: 600; +} \ No newline at end of file diff --git a/src/app/components/sales/scam-orders/scam-orders.component.ts b/src/app/components/sales/scam-orders/scam-orders.component.ts index 4fb44c4..1ea813f 100644 --- a/src/app/components/sales/scam-orders/scam-orders.component.ts +++ b/src/app/components/sales/scam-orders/scam-orders.component.ts @@ -57,52 +57,13 @@ export class ScamOrdersComponent { ngOnInit() { this.userService.getUserByToken(this.token).subscribe((userInfo) => { this.loggedRole = userInfo.userRole; - if (this.loggedRole != 'ROLE_ADMIN') { - this.isShop = true; - this.shopId = userInfo.shopId - } this.listOrder(); }) } listOrder() { - if (this.isShop) { - this.orderService.getOrdersByShopId(this.shopId, this.thePageNumber - 1, this.thePageSize, this.sortBy, this.sortDir) - .subscribe(this.processResult()); - - this.shipperService.findFreeShopShipper(this.shopId).subscribe((shippers) => { - this.shippers = shippers; - }) - } - else { - this.orderService - .getOrdersPagination(this.thePageNumber - 1, this.thePageSize, this.sortBy, this.sortDir) - .subscribe(this.processResult()); - } - - this.refreshTimeout = setTimeout(() => { - this.refreshOrder(); - }, this.refreshInterval); - } - - refreshOrder() { - if (this.isShop) { - this.orderService.getOrdersByShopId(this.shopId, this.thePageNumber - 1, this.thePageSize, this.sortBy, this.sortDir) - .subscribe(this.refreshResult()); - - this.shipperService.findFreeShopShipper(this.shopId).subscribe((shippers) => { - this.shippers = shippers; - }) - } - else { - this.orderService - .getOrdersPagination(this.thePageNumber - 1, this.thePageSize, this.sortBy, this.sortDir) - .subscribe(this.refreshResult()); - } - - this.refreshTimeout = setTimeout(() => { - this.refreshOrder(); - }, this.refreshInterval); + this.orderService.findOrderByStatus('REJECT_DELIVERY', this.thePageNumber - 1, this.thePageSize, this.sortBy, this.sortDir) + .subscribe(this.processResult()); } searchOrder() { @@ -117,6 +78,7 @@ export class ScamOrdersComponent { processResult() { return (data: any) => { + console.log(data) this.orders = data.orders; this.thePageNumber = data.page.pageNo + 1; this.thePageSize = data.page.pageSize; @@ -125,18 +87,6 @@ export class ScamOrdersComponent { }; } - refreshResult() { - return (data: any) => { - this.orders = data.orders; - this.thePageNumber = data.page.pageNo + 1; - this.thePageSize = data.page.pageSize; - this.theTotalElements = data.page.totalElements; - if (this.totalOrders != this.theTotalElements) { - this.totalOrders = this.theTotalElements; - } - }; - } - // Change status order modal openStatusModal(confirmBoxChangeStatus: TemplateRef, userId: number, orderId: number, shipper: Shipper) { this.isHaveShipper = false; diff --git a/src/app/components/utility/list-address/list-address.component.html b/src/app/components/utility/list-address/list-address.component.html index e6a19f9..4905ab9 100644 --- a/src/app/components/utility/list-address/list-address.component.html +++ b/src/app/components/utility/list-address/list-address.component.html @@ -11,7 +11,7 @@ (change)="searchAddress()" />
-
+
diff --git a/src/app/shared/routes/content-routes.ts b/src/app/shared/routes/content-routes.ts index 9d3fccd..cf7305c 100644 --- a/src/app/shared/routes/content-routes.ts +++ b/src/app/shared/routes/content-routes.ts @@ -33,17 +33,17 @@ export const content: Routes = [ breadcrumb: "Coupons" } }, - { - path: 'pages', - loadChildren: () => import('../../components/pages/pages.module').then(m => m.PagesModule), - data: { - breadcrumb: "Pages" - } - }, - { - path: 'media', - loadChildren: () => import('../../components/media/media.module').then(m => m.MediaModule), - }, + // { + // path: 'pages', + // loadChildren: () => import('../../components/pages/pages.module').then(m => m.PagesModule), + // data: { + // breadcrumb: "Pages" + // } + // }, + // { + // path: 'media', + // loadChildren: () => import('../../components/media/media.module').then(m => m.MediaModule), + // }, { path: 'menus', loadChildren: () => import('../../components/menus/menus.module').then(m => m.MenusModule), @@ -65,13 +65,13 @@ export const content: Routes = [ breadcrumb: "Shop" } }, - { - path: 'localization', - loadChildren: () => import('../../components/localization/localization.module').then(m => m.LocalizationModule), - data: { - breadcrumb: "Localization" - } - }, + // { + // path: 'localization', + // loadChildren: () => import('../../components/localization/localization.module').then(m => m.LocalizationModule), + // data: { + // breadcrumb: "Localization" + // } + // }, { path: 'reports', loadChildren: () => import('../../components/reports/reports.module').then(m => m.ReportsModule), diff --git a/src/app/shared/service/auth.service.ts b/src/app/shared/service/auth.service.ts index 0298392..05cf836 100644 --- a/src/app/shared/service/auth.service.ts +++ b/src/app/shared/service/auth.service.ts @@ -36,6 +36,10 @@ export class AuthService { return this.httpClient.post(this.baseUrl + `/check`, userDto); } + checkIdentifiedCode(code: string) { + return this.httpClient.get(this.baseUrl + `/check?code=${code}`); + } + checkEmailInDB(email: string) { return this.httpClient.get(this.baseUrl + `/check-email?email=${email}`) } diff --git a/src/app/shared/service/firebase.service.ts b/src/app/shared/service/firebase.service.ts index a140187..eba55aa 100644 --- a/src/app/shared/service/firebase.service.ts +++ b/src/app/shared/service/firebase.service.ts @@ -50,7 +50,7 @@ export class FirebaseService { if (!response.user.emailVerified) { response.user.sendEmailVerification(); this.router.navigate(['/auth/email-not-verified']); - resolve(false); // trả về false nếu email chưa được xác thực + resolve(true); // trả về false nếu email chưa được xác thực } else { response.user.getIdToken().then((token: string) => { this.token = token; diff --git a/src/app/shared/service/order.service.ts b/src/app/shared/service/order.service.ts index 25063b6..7540098 100644 --- a/src/app/shared/service/order.service.ts +++ b/src/app/shared/service/order.service.ts @@ -61,6 +61,10 @@ export class OrderService { findOrdersByTrackingNumber(trackingNumber: string, thePage: number, thePageSize: number, sortBy: string, sortDir: string) { return this.httpClient.get(this.orderUrl + `/search?trackingNumber=${trackingNumber}&pageNo=${thePage}&pageSize=${thePageSize}&sortBy=${sortBy}&sortDir=${sortDir}`); } + + findOrderByStatus(status: string, thePage: number, thePageSize: number, sortBy: string, sortDir: string) { + return this.httpClient.get(this.orderUrl + `/get?status=${status}`); + } } interface GetResponseOrders { diff --git a/src/assets/images/resize-bg.png b/src/assets/images/resize-bg.png new file mode 100644 index 0000000..8d56924 Binary files /dev/null and b/src/assets/images/resize-bg.png differ