@ -0,0 +1,30 @@ |
|||
{ |
|||
"$schema": "./node_modules/@angular/service-worker/config/schema.json", |
|||
"index": "/index.html", |
|||
"assetGroups": [ |
|||
{ |
|||
"name": "app", |
|||
"installMode": "prefetch", |
|||
"resources": { |
|||
"files": [ |
|||
"/favicon.ico", |
|||
"/index.html", |
|||
"/manifest.webmanifest", |
|||
"/*.css", |
|||
"/*.js" |
|||
] |
|||
} |
|||
}, |
|||
{ |
|||
"name": "assets", |
|||
"installMode": "lazy", |
|||
"updateMode": "prefetch", |
|||
"resources": { |
|||
"files": [ |
|||
"/assets/**", |
|||
"/*.(svg|cur|jpg|jpeg|png|apng|webp|avif|gif|otf|ttf|woff|woff2)" |
|||
] |
|||
} |
|||
} |
|||
] |
|||
} |
@ -1,17 +1,34 @@ |
|||
import { Component } from '@angular/core'; |
|||
import { Component, OnInit, ViewEncapsulation } from '@angular/core'; |
|||
import { SwUpdate } from '@angular/service-worker'; |
|||
import { interval } from 'rxjs'; |
|||
|
|||
@Component({ |
|||
selector : 'app-root', |
|||
selector: 'app-root', |
|||
templateUrl: './app.component.html', |
|||
styleUrls : ['./app.component.scss'] |
|||
styleUrls: ['./app.component.scss'], |
|||
encapsulation: ViewEncapsulation.None |
|||
}) |
|||
export class AppComponent |
|||
{ |
|||
/** |
|||
* Constructor |
|||
*/ |
|||
constructor() |
|||
{ |
|||
export class AppComponent implements OnInit { |
|||
hasUpdate = false; |
|||
|
|||
constructor( |
|||
private swUpdate: SwUpdate, |
|||
) { |
|||
} |
|||
ngOnInit(): void { |
|||
// check for platform update
|
|||
if (this.swUpdate.isEnabled) { |
|||
interval(60000).subscribe(() => this.swUpdate.checkForUpdate().then(() => { |
|||
// checking for updates
|
|||
})); |
|||
} |
|||
this.swUpdate.available.subscribe(() => { |
|||
this.hasUpdate = true; |
|||
}); |
|||
} |
|||
|
|||
reloadSite(): void { |
|||
location.reload(); |
|||
} |
|||
|
|||
} |
|||
|
@ -0,0 +1,142 @@ |
|||
<div class="row" style="display: flex;justify-content:space-between"> |
|||
<div class="row" style="display: flex;justify-content:center;width: 100%;"> |
|||
<h2 mat-dialog-title style="text-align: center;">Coupons For {{newCoupon.targetProduct}} </h2> |
|||
</div> |
|||
<!-- <button mat-button mat-dialog-close>Cancel</button> --> |
|||
<button mat-button [mat-dialog-close]="true" cdkFocusInitial>x</button> |
|||
</div> |
|||
<mat-dialog-content class="mat-typography"> |
|||
<div class=" py-2 pl-3 pr-3 sm:py-4 md:pl-4 md:pr-6"> |
|||
<div class="columns" style="display: flex;align-items: center"> |
|||
<div class="column" style="display: flex;align-items: baseline"> |
|||
<mat-label style="margin-right: 48px;"> |
|||
<strong class="tileHead">Product Name </strong> |
|||
</mat-label> |
|||
</div> |
|||
<div class="column"> |
|||
<mat-label style="margin-right: 48px;"> |
|||
{{newCoupon.targetProduct}} |
|||
</mat-label> |
|||
</div> |
|||
</div> |
|||
<div class="columns" style="display: flex;align-items: center;margin-top: 15px;"> |
|||
<div class="column" style="display: flex;align-items: baseline"> |
|||
<mat-label style="margin-right: 48px;"> |
|||
<strong class="tileHead">Original Price </strong> |
|||
</mat-label> |
|||
</div> |
|||
<div class="column"> |
|||
<mat-label style="margin-right: 48px;"> |
|||
{{selectedProduct.unitPrice | currency:"GHS "}} |
|||
</mat-label> |
|||
</div> |
|||
</div> |
|||
<div class="columns" style="display: flex;align-items: center;margin-top: 15px;"> |
|||
<div class="column" style="display: flex;align-items: baseline"> |
|||
<mat-label style="margin-right: 20px;"> |
|||
<strong class="tileHead">Coupon Type</strong> |
|||
</mat-label> |
|||
</div> |
|||
<div class="column"> |
|||
<mat-label style="margin-right: 48px;"> |
|||
{{newCoupon.type}} |
|||
</mat-label> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="columns" style="display: flex;align-items: center"> |
|||
<div class="column"> |
|||
<mat-label style="margin-right: 48px;"> |
|||
<strong class="tileHead">Coupon Condition</strong> |
|||
</mat-label> |
|||
</div> |
|||
<div class="column"> |
|||
<textarea name="" id="" cols="30" rows="5" style="border: 1px solid #cbd5e1;" |
|||
[(ngModel)]="newCoupon.condition" disabled></textarea> |
|||
</div> |
|||
</div> |
|||
<div class="columns" style="display: flex;align-items: center"> |
|||
<div class="column" style="display: flex;align-items: baseline"> |
|||
<mat-label style="margin-right: 48px;"> |
|||
<strong class="tileHead">Number Of Coupons</strong> |
|||
</mat-label> |
|||
</div> |
|||
<div class="column"> |
|||
<mat-form-field appearance="fill" style="min-width: 200px;"> |
|||
<input matInput disabled style="margin-left:10px;" type="number" [(ngModel)]="newCoupon.quantity"> |
|||
</mat-form-field> |
|||
</div> |
|||
|
|||
</div> |
|||
<div style="display: flex;margin-top: 20px;align-items: baseline" *ngIf="!isScreenSmall"> |
|||
<div class="columns" style="display: flex;align-items: center"> |
|||
<div class="column" style="display: flex;align-items: baseline"> |
|||
<mat-label style="margin-right: 48px;"> |
|||
<strong class="tileHead">Percentage Off </strong> |
|||
</mat-label> |
|||
</div> |
|||
<div class="column"> |
|||
<mat-label> |
|||
From {{newCoupon.lower}}% To {{newCoupon.upper}}% |
|||
</mat-label> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div *ngIf="isScreenSmall"> |
|||
<mat-label style="margin-right: 48px;"> |
|||
<strong class="tileHead">Percentage Off </strong> |
|||
</mat-label> |
|||
<div style="display: flex;align-items: baseline"> |
|||
<mat-form-field appearance="outline" style="margin-right:10px;"> |
|||
<span matPrefix>From </span> |
|||
<input matInput disabled type="number" [(ngModel)]="newCoupon.lower" min="0" max="100"> |
|||
<span matSuffix>% </span> |
|||
</mat-form-field> |
|||
</div> |
|||
<div style="display: flex;align-items: baseline"> |
|||
<mat-form-field appearance="outline" style="margin-left:10px;"> |
|||
<span matPrefix>To </span> |
|||
<input matInput disabled type="number" [(ngModel)]="newCoupon.upper" min="0" max="100"> |
|||
<span matSuffix>% </span> |
|||
</mat-form-field> |
|||
</div> |
|||
</div> |
|||
<div class="columns" style="display: flex;margin-top: 20px;align-items: center"> |
|||
<div class="column" style="display: flex;align-items: baseline"> |
|||
<mat-label style="margin-right: 48px;"> |
|||
<strong class="tileHead">Coupon Worth </strong> |
|||
</mat-label> |
|||
</div> |
|||
<div class="column"> |
|||
<mat-label> |
|||
From {{selectedProduct.unitPrice | couponWorth:newCoupon.lower}} To {{selectedProduct.unitPrice | |
|||
couponWorth:newCoupon.upper}} |
|||
</mat-label> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="columns" style="display: flex;align-items: center;margin-top: 20px;" *ngIf="!isScreenSmall"> |
|||
<div class="column" style="display: flex;align-items: baseline"> |
|||
<mat-label style="margin-right: 48px;"> |
|||
<strong class="tileHead">Date Of Expiration</strong> |
|||
</mat-label> |
|||
</div> |
|||
<div class="column"> |
|||
<mat-label style="margin-right: 30px;"> |
|||
{{newCoupon.expiration | date:"medium"}} |
|||
</mat-label> |
|||
</div> |
|||
</div> |
|||
<div *ngIf="isScreenSmall"> |
|||
<div style="display: flex;align-items: baseline;margin-top: 20px;"> |
|||
<mat-label style="margin-right: 48px;"> |
|||
<strong class="tileHead">Date Of Expiration </strong> |
|||
</mat-label> |
|||
<mat-label style="margin-right: 30px;"> |
|||
{{newCoupon.expiration | date:"medium"}} |
|||
</mat-label> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</mat-dialog-content> |
@ -0,0 +1,11 @@ |
|||
.columns { |
|||
display: flex; |
|||
flex-direction: row; |
|||
flex-wrap: wrap; |
|||
width: 100%; |
|||
} |
|||
|
|||
.column { |
|||
flex: 50%; |
|||
font-size: medium; |
|||
} |
@ -1,20 +1,20 @@ |
|||
import { ComponentFixture, TestBed } from '@angular/core/testing'; |
|||
|
|||
import { DesiresComponent } from './desires.component'; |
|||
import { DetailsDialogComponent } from './details-dialog.component'; |
|||
|
|||
describe('DesiresComponent', () => { |
|||
let component: DesiresComponent; |
|||
let fixture: ComponentFixture<DesiresComponent>; |
|||
describe('DetailsDialogComponent', () => { |
|||
let component: DetailsDialogComponent; |
|||
let fixture: ComponentFixture<DetailsDialogComponent>; |
|||
|
|||
beforeEach(async () => { |
|||
await TestBed.configureTestingModule({ |
|||
declarations: [ DesiresComponent ] |
|||
declarations: [ DetailsDialogComponent ] |
|||
}) |
|||
.compileComponents(); |
|||
}); |
|||
|
|||
beforeEach(() => { |
|||
fixture = TestBed.createComponent(DesiresComponent); |
|||
fixture = TestBed.createComponent(DetailsDialogComponent); |
|||
component = fixture.componentInstance; |
|||
fixture.detectChanges(); |
|||
}); |
@ -0,0 +1,69 @@ |
|||
import { Component, Inject, OnInit } from '@angular/core'; |
|||
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; |
|||
import { ConfirmBoxEvokeService } from '@costlydeveloper/ngx-awesome-popup'; |
|||
import { tesoMediaWatcherService } from '@teso/services/media-watcher'; |
|||
import { CouponsType, CouponsModel } from 'app/models/couponsModel'; |
|||
import { ProductsModel } from 'app/models/productsModel'; |
|||
import { Subject } from 'rxjs'; |
|||
import { takeUntil } from 'rxjs/operators'; |
|||
import { ProductsService } from '../../Products/products.service'; |
|||
import { CouponsService } from '../coupons.service'; |
|||
import { NewCouponsComponent } from '../NewCoupons/new-coupons.component'; |
|||
|
|||
@Component({ |
|||
selector: 'app-details-dialog', |
|||
templateUrl: './details-dialog.component.html', |
|||
styleUrls: ['./details-dialog.component.scss'] |
|||
}) |
|||
export class DetailsDialogComponent implements OnInit { |
|||
products: ProductsModel[] = []; |
|||
selectedProduct: ProductsModel = { |
|||
productName: '', |
|||
businessID: '', |
|||
productDesc: '', |
|||
productID: '', |
|||
categoryID: '', |
|||
unitPrice: 0, |
|||
productImage: '', |
|||
images: [] |
|||
}; |
|||
selectedType: any = {}; |
|||
isLoading: boolean = false; |
|||
couponTypes: CouponsType[] = []; |
|||
fromWorth: number; |
|||
toWorth: number; |
|||
isScreenSmall: boolean; |
|||
newCoupon: CouponsModel = { |
|||
couponID: '', |
|||
businessID: '', |
|||
targetProduct: '', |
|||
type: '', |
|||
quantity: 0, |
|||
lower: 0, |
|||
condition: '', |
|||
upper: 0, |
|||
numberClaimed: 0, |
|||
status: '', |
|||
expiration: new Date(), |
|||
}; |
|||
expiryDate: Date = new Date(); |
|||
expiryTime: Date = new Date(); |
|||
private _unsubscribeAll: Subject<any> = new Subject<any>(); |
|||
|
|||
constructor( |
|||
public dialog: MatDialog, private _productService: ProductsService, |
|||
private _couponService: CouponsService, private _tesoMediaWatcherService: tesoMediaWatcherService, |
|||
public dialogRef: MatDialogRef<DetailsDialogComponent>,@Inject(MAT_DIALOG_DATA) public data: { coupon: CouponsModel }, |
|||
private confirmBoxEvokeService: ConfirmBoxEvokeService,) { |
|||
this.newCoupon = data.coupon; |
|||
this._productService.data$.pipe(takeUntil(this._unsubscribeAll)).subscribe((d) => { |
|||
this.products = d; |
|||
this.selectedProduct = this.products.find((p)=> p.productName == this.newCoupon.targetProduct); |
|||
}); |
|||
console.log(this.newCoupon) |
|||
} |
|||
|
|||
ngOnInit(): void { |
|||
} |
|||
|
|||
} |
@ -1,25 +0,0 @@ |
|||
import { ComponentFixture, TestBed } from '@angular/core/testing'; |
|||
|
|||
import { PersonalizedCouponsComponent } from './personalized-coupons.component'; |
|||
|
|||
describe('PersonalizedCouponsComponent', () => { |
|||
let component: PersonalizedCouponsComponent; |
|||
let fixture: ComponentFixture<PersonalizedCouponsComponent>; |
|||
|
|||
beforeEach(async () => { |
|||
await TestBed.configureTestingModule({ |
|||
declarations: [ PersonalizedCouponsComponent ] |
|||
}) |
|||
.compileComponents(); |
|||
}); |
|||
|
|||
beforeEach(() => { |
|||
fixture = TestBed.createComponent(PersonalizedCouponsComponent); |
|||
component = fixture.componentInstance; |
|||
fixture.detectChanges(); |
|||
}); |
|||
|
|||
it('should create', () => { |
|||
expect(component).toBeTruthy(); |
|||
}); |
|||
}); |
@ -0,0 +1 @@ |
|||
<p>gold-transaction works!</p> |
@ -0,0 +1,25 @@ |
|||
import { ComponentFixture, TestBed } from '@angular/core/testing'; |
|||
|
|||
import { GoldTransactionComponent } from './gold-transaction.component'; |
|||
|
|||
describe('GoldTransactionComponent', () => { |
|||
let component: GoldTransactionComponent; |
|||
let fixture: ComponentFixture<GoldTransactionComponent>; |
|||
|
|||
beforeEach(async () => { |
|||
await TestBed.configureTestingModule({ |
|||
declarations: [ GoldTransactionComponent ] |
|||
}) |
|||
.compileComponents(); |
|||
}); |
|||
|
|||
beforeEach(() => { |
|||
fixture = TestBed.createComponent(GoldTransactionComponent); |
|||
component = fixture.componentInstance; |
|||
fixture.detectChanges(); |
|||
}); |
|||
|
|||
it('should create', () => { |
|||
expect(component).toBeTruthy(); |
|||
}); |
|||
}); |
@ -0,0 +1,15 @@ |
|||
import { Component, OnInit } from '@angular/core'; |
|||
|
|||
@Component({ |
|||
selector: 'app-gold-transaction', |
|||
templateUrl: './gold-transaction.component.html', |
|||
styleUrls: ['./gold-transaction.component.scss'] |
|||
}) |
|||
export class GoldTransactionComponent implements OnInit { |
|||
|
|||
constructor() { } |
|||
|
|||
ngOnInit(): void { |
|||
} |
|||
|
|||
} |
@ -0,0 +1,83 @@ |
|||
<div class="row" style="display: flex;justify-content:space-between;"> |
|||
<div class="row" style="display: flex;justify-content:center;width: 100%;"> |
|||
<h3 mat-dialog-title style="text-align: center;">Business Information</h3> |
|||
</div> |
|||
<button mat-button [mat-dialog-close]="null" cdkFocusInitial>x</button> |
|||
</div> |
|||
<mat-dialog-content class="mat-typography"> |
|||
<div class=" py-2 pl-3 pr-3 sm:py-4 md:pl-4 md:pr-6" style="overflow-y: hidden !important;"> |
|||
<div style="display: flex;justify-content:space-between;"> |
|||
<mat-label style="margin-right: 48px;"> |
|||
<strong class="tileHead">Shop Name </strong> |
|||
</mat-label> |
|||
<mat-form-field appearance="fill" style="width: 350px;"> |
|||
<input matInput style="margin-left:10px;" type="text" [(ngModel)]="newBusiness.businessName"> |
|||
</mat-form-field> |
|||
</div> |
|||
<div style="display: flex;justify-content:space-between;"> |
|||
<mat-label style="margin-right: 20px;"> |
|||
<strong class="tileHead">Shop Category</strong> |
|||
</mat-label> |
|||
<mat-form-field appearance="fill" style="width: 350px;"> |
|||
<mat-select [(ngModel)]="selectedCategory"> |
|||
<mat-option *ngFor="let category of businessCategories" [value]="category"> |
|||
{{category.categoryName}} |
|||
</mat-option> |
|||
</mat-select> |
|||
</mat-form-field> |
|||
</div> |
|||
<div style="display: flex;justify-content:space-between;"> |
|||
<mat-label style="margin-right: 48px;"> |
|||
<strong class="tileHead">Physical Address </strong> |
|||
</mat-label> |
|||
<mat-form-field appearance="fill" style="width: 350px;"> |
|||
<input matInput style="margin-left:10px;" type="text" [(ngModel)]="newBusiness.businessAddress"> |
|||
</mat-form-field> |
|||
</div> |
|||
|
|||
<div style="display: flex;justify-content:space-between;"> |
|||
<mat-label style="margin-right: 48px;"> |
|||
<strong class="tileHead">Digital Address </strong> |
|||
</mat-label> |
|||
<mat-form-field appearance="fill" style="width: 350px;"> |
|||
<span matPrefix> |
|||
<a href="https://ghanapostgps.com/map/" target="blank"> |
|||
<mat-icon class="icon-size-5" [svgIcon]="'heroicons_solid:information-circle'" |
|||
style="color: #0152cc;" matTooltip="visit https://ghanapostgps.com/map/"> |
|||
</mat-icon> |
|||
</a> |
|||
</span> |
|||
<input matInput style="margin-left:10px;" type="text" [(ngModel)]="newBusiness.businessDigitalAddress"> |
|||
</mat-form-field> |
|||
</div> |
|||
<div style="display: flex;justify-content:space-between;"> |
|||
<mat-label style="margin-right: 48px;"> |
|||
<strong class="tileHead">Date Of Establishment </strong> |
|||
</mat-label> |
|||
<mat-form-field appearance="fill" style="width: 350px;"> |
|||
<input matInput style="margin-left:10px;" type="date" [(ngModel)]="newBusiness.dateOfEst"> |
|||
</mat-form-field> |
|||
</div> |
|||
<div style="display: flex;justify-content:space-between;"> |
|||
<mat-label style="margin-right: 48px;"> |
|||
<strong class="tileHead">Telephone </strong> |
|||
</mat-label> |
|||
<mat-form-field appearance="fill" style="width: 350px;"> |
|||
<input matInput style="margin-left:10px;" type="text" [(ngModel)]="newBusiness.businessContact"> |
|||
|
|||
</mat-form-field> |
|||
</div> |
|||
<div style="display: flex;justify-content:space-between;"> |
|||
<mat-label style="margin-right: 48px;"> |
|||
<strong class="tileHead">Email Address </strong> |
|||
</mat-label> |
|||
<mat-form-field appearance="fill" style="width: 350px;"> |
|||
<input matInput style="margin-left:10px;" type="text" [(ngModel)]="newBusiness.businessEmail" > |
|||
</mat-form-field> |
|||
</div> |
|||
|
|||
<div style="display: flex;justify-content:center;width: 100%;"> |
|||
<button mat-button style="background-color: green;color: white;" (click)="closeDialog()" >Confirm Add</button> |
|||
</div> |
|||
</div> |
|||
</mat-dialog-content> |
@ -1,20 +1,20 @@ |
|||
import { ComponentFixture, TestBed } from '@angular/core/testing'; |
|||
|
|||
import { CouponsComponent } from './coupons.component'; |
|||
import { TempShopComponent } from './temp-shop.component'; |
|||
|
|||
describe('CouponsComponent', () => { |
|||
let component: CouponsComponent; |
|||
let fixture: ComponentFixture<CouponsComponent>; |
|||
describe('TempShopComponent', () => { |
|||
let component: TempShopComponent; |
|||
let fixture: ComponentFixture<TempShopComponent>; |
|||
|
|||
beforeEach(async () => { |
|||
await TestBed.configureTestingModule({ |
|||
declarations: [ CouponsComponent ] |
|||
declarations: [ TempShopComponent ] |
|||
}) |
|||
.compileComponents(); |
|||
}); |
|||
|
|||
beforeEach(() => { |
|||
fixture = TestBed.createComponent(CouponsComponent); |
|||
fixture = TestBed.createComponent(TempShopComponent); |
|||
component = fixture.componentInstance; |
|||
fixture.detectChanges(); |
|||
}); |
@ -0,0 +1,59 @@ |
|||
import { Component, Inject, OnInit } from '@angular/core'; |
|||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; |
|||
import { ConfirmBoxEvokeService } from '@costlydeveloper/ngx-awesome-popup'; |
|||
import { UserService } from 'app/core/user/user.service'; |
|||
import { BusinessCategory, TesoBusinessDetail } from 'app/models/businessModel'; |
|||
import { Subject } from 'rxjs'; |
|||
import { takeUntil } from 'rxjs/operators'; |
|||
import { ProfileService } from '../Profile/profile.service'; |
|||
|
|||
@Component({ |
|||
selector: 'app-temp-shop', |
|||
templateUrl: './temp-shop.component.html', |
|||
styleUrls: ['./temp-shop.component.scss'] |
|||
}) |
|||
export class TempShopComponent implements OnInit { |
|||
businessCategories: BusinessCategory[] = []; |
|||
selectedCategory: BusinessCategory; |
|||
newBusiness: TesoBusinessDetail = { |
|||
businessId: "", |
|||
Handle: "", |
|||
businessName: "", |
|||
businessEmail: "", |
|||
businessTin: "", |
|||
businessDescription: "", |
|||
businessCategory: "", |
|||
businessAddress: "", |
|||
businessContact: "", |
|||
businessLogo: "", |
|||
dateOfEst: new Date(), |
|||
businessDigitalAddress: "", |
|||
businessLatitude: "", |
|||
businessLongitude: "", |
|||
}; |
|||
private _unsubscribeAll: Subject<any> = new Subject<any>(); |
|||
constructor(public dialogRef: MatDialogRef<TempShopComponent>, private _profileService: ProfileService, private confirmBoxEvokeService: ConfirmBoxEvokeService, |
|||
private _userService: UserService) { } |
|||
|
|||
ngOnInit(): void { |
|||
this._profileService.categories$.pipe(takeUntil(this._unsubscribeAll)).subscribe((d) => { |
|||
this.businessCategories = d; |
|||
}); |
|||
} |
|||
|
|||
closeDialog() { |
|||
if (this.newBusiness.businessName != '' && this.newBusiness.businessContact != '' && this.newBusiness.businessDigitalAddress) { |
|||
this.confirmBoxEvokeService.info("Confirm Action", `Are you sure you would to add this business as a target for yor coupon ?`, "YES", "NO").subscribe(response => { |
|||
if (response.clickedButtonID == "yes") { |
|||
this.dialogRef.close(this.newBusiness); |
|||
} |
|||
}); |
|||
}else{ |
|||
this.confirmBoxEvokeService.info("Action Required", `To continue you should have the Business Name, Business Telephone and the digital address of the busines entered `, "OK") |
|||
.subscribe(response => { |
|||
|
|||
}); |
|||
} |
|||
} |
|||
|
|||
} |
@ -0,0 +1,53 @@ |
|||
import { NgModule } from '@angular/core'; |
|||
import { CommonModule } from '@angular/common'; |
|||
import { MatButtonModule } from '@angular/material/button'; |
|||
import { MatButtonToggleModule } from '@angular/material/button-toggle'; |
|||
import { MatRippleModule } from '@angular/material/core'; |
|||
import { MatDialogModule } from '@angular/material/dialog'; |
|||
import { MatDividerModule } from '@angular/material/divider'; |
|||
import { MatFormFieldModule } from '@angular/material/form-field'; |
|||
import { MatIconModule } from '@angular/material/icon'; |
|||
import { MatInputModule } from '@angular/material/input'; |
|||
import { MatMenuModule } from '@angular/material/menu'; |
|||
import { MatPaginatorModule } from '@angular/material/paginator'; |
|||
import { MatProgressBarModule } from '@angular/material/progress-bar'; |
|||
import { MatSelectModule } from '@angular/material/select'; |
|||
import { MatSidenavModule } from '@angular/material/sidenav'; |
|||
import { MatSortModule } from '@angular/material/sort'; |
|||
import { MatTableModule } from '@angular/material/table'; |
|||
import { MatTabsModule } from '@angular/material/tabs'; |
|||
import { MatTooltipModule } from '@angular/material/tooltip'; |
|||
import { TranslocoModule } from '@ngneat/transloco'; |
|||
import { SharedModule } from 'app/shared/shared.module'; |
|||
import { TempShopComponent } from './temp-shop.component'; |
|||
|
|||
|
|||
|
|||
@NgModule({ |
|||
declarations: [ |
|||
TempShopComponent |
|||
], |
|||
imports: [ |
|||
CommonModule, |
|||
MatButtonModule, |
|||
MatButtonToggleModule, |
|||
MatDividerModule, |
|||
MatIconModule, |
|||
MatFormFieldModule, |
|||
MatInputModule, |
|||
MatMenuModule, |
|||
MatProgressBarModule, |
|||
MatRippleModule, |
|||
MatSidenavModule, |
|||
MatSortModule, |
|||
MatTableModule, |
|||
MatTabsModule, |
|||
MatDialogModule, |
|||
TranslocoModule, |
|||
SharedModule, |
|||
MatPaginatorModule, |
|||
MatSelectModule, |
|||
MatTooltipModule, |
|||
] |
|||
}) |
|||
export class TempShopModule { } |
@ -0,0 +1,106 @@ |
|||
|
|||
<!-- <div class="flex flex-col sm:flex-row items-center md:items-start sm:justify-center md:justify-start flex-auto min-w-0"> |
|||
<div *ngIf="isScreenSmall" |
|||
class="md:flex md:items-center md:justify-end w-full sm:w-auto md:h-full md:w-1/2 py-8 px-4 sm:p-12 md:p-16 sm:rounded-2xl md:rounded-none sm:shadow md:shadow-none sm:bg-card"> |
|||
<div class="w-full max-w-80 sm:w-80 mx-auto sm:mx-0"> |
|||
<div class="w-full sm:w-auto py-8 px-4 sm:p-12 sm:rounded-2xl sm:shadow sm:bg-card"> |
|||
<!-- Logo --> |
|||
<div class="w-20"> |
|||
<img src="assets/images/logo.png"> |
|||
</div> |
|||
|
|||
<!-- Title --> |
|||
<div class="mt-8 text-4xl font-extrabold tracking-tight leading-tight">Sign in</div> |
|||
<div class="flex items-baseline mt-0.5 font-medium"> |
|||
<div>Enter phone number of business</div> |
|||
</div> |
|||
|
|||
<!-- Alert --> |
|||
<teso-alert class="mt-8 -mb-4" *ngIf="showAlert" [appearance]="'outline'" [showIcon]="false" |
|||
[type]="alert.type" [@shake]="alert.type === 'error'"> |
|||
{{alert.message}} |
|||
</teso-alert> |
|||
|
|||
<!-- Sign in form --> |
|||
|
|||
<mat-form-field appearance="outline"> |
|||
|
|||
<ngx-mat-intl-tel-input [preferredCountries]="['gh', 'ng']" [onlyCountries]="['gh', 'ng']" |
|||
[enablePlaceholder]="true" [enableSearch]="false" name="phone"> |
|||
</ngx-mat-intl-tel-input> |
|||
<mat-hint>Standard call, message, or data rates may apply.</mat-hint> |
|||
</mat-form-field> |
|||
<!-- Actions --> |
|||
<div class="inline-flex items-end justify-between w-full mt-3.5"> |
|||
<mat-checkbox [color]="'primary'"> |
|||
Remember me |
|||
</mat-checkbox> |
|||
</div> |
|||
|
|||
<!-- Submit button --> |
|||
<button class="teso-mat-button-large w-full mt-6" mat-flat-button [color]="'primary'" |
|||
(click)="signIn()"> |
|||
<span> |
|||
Sign in |
|||
</span> |
|||
<!-- <mat-progress-spinner |
|||
*ngIf="signInForm.disabled" |
|||
[diameter]="24" |
|||
[mode]="'indeterminate'"></mat-progress-spinner> --> |
|||
</button> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
<div id="welcomeBoard" |
|||
class="relative hidden md:flex flex-auto items-center justify-center w-1/2 h-full p-5 lg:px-20 overflow-hidden bg-gray-800 dark:border-l"> |
|||
|
|||
<div class="w-full max-w-80 sm:w-80 mx-auto sm:mx-0"> |
|||
<div class="w-full sm:w-auto py-5 px-4 sm:p-8 sm:rounded-2xl sm:shadow sm:bg-card" style="background-color: #484444c4 !important;color: white !important;"> |
|||
<!-- Logo --> |
|||
<div class="w-30" style="width: 100%;justify-content: center;display: flex;"> |
|||
<img src="assets/images/logo.png"> |
|||
</div> |
|||
|
|||
<!-- Title --> |
|||
<div class="mt-8 text-4xl font-extrabold tracking-tight leading-tight">Sign in</div> |
|||
<div class="flex items-baseline mt-0.5 font-medium"> |
|||
<div>Enter phone number of business</div> |
|||
</div> |
|||
|
|||
<!-- Alert --> |
|||
<teso-alert class="mt-8 -mb-4" *ngIf="showAlert" [appearance]="'outline'" [showIcon]="false" |
|||
[type]="alert.type" [@shake]="alert.type === 'error'"> |
|||
{{alert.message}} |
|||
</teso-alert> |
|||
|
|||
<!-- Sign in form --> |
|||
|
|||
<mat-form-field appearance="outline"> |
|||
<ngx-mat-intl-tel-input [preferredCountries]="['gh', 'ng']" [onlyCountries]="['gh', 'ng']" |
|||
[enablePlaceholder]="true" [enableSearch]="false" name="phone"> |
|||
</ngx-mat-intl-tel-input> |
|||
<mat-hint style="color: white !important;">Standard call, message, or data rates may apply.</mat-hint> |
|||
</mat-form-field> |
|||
<!-- Actions --> |
|||
<div class="inline-flex items-end justify-between w-full mt-3.5"> |
|||
<mat-checkbox [color]="'primary'"> |
|||
Remember me |
|||
</mat-checkbox> |
|||
</div> |
|||
|
|||
<!-- Submit button --> |
|||
<button class="teso-mat-button-large w-full mt-6" mat-flat-button [color]="'primary'" |
|||
(click)="signIn()"> |
|||
<span> |
|||
Sign in |
|||
</span> |
|||
<!-- <mat-progress-spinner |
|||
*ngIf="signInForm.disabled" |
|||
[diameter]="24" |
|||
[mode]="'indeterminate'"></mat-progress-spinner> --> |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> --> |
@ -0,0 +1,20 @@ |
|||
import { Pipe, PipeTransform } from "@angular/core"; |
|||
|
|||
@Pipe({ |
|||
name: 'couponProductShort' |
|||
}) |
|||
export class CouponProductShort implements PipeTransform { |
|||
|
|||
constructor( |
|||
) { } |
|||
|
|||
transform(value: string): string { |
|||
|
|||
if (value.length > 70) { |
|||
return value.substring(0, 66) + "...."; |
|||
} else { |
|||
return value; |
|||
} |
|||
} |
|||
|
|||
} |
@ -0,0 +1,13 @@ |
|||
import { Pipe, PipeTransform } from '@angular/core'; |
|||
|
|||
@Pipe({ |
|||
name: 'personalizedcouponWorth' |
|||
}) |
|||
export class PersonalizedCouponWorthPipe implements PipeTransform { |
|||
|
|||
transform(value: number,rate:number): string { |
|||
var worth = (rate * value)/100; |
|||
return `GH¢ ${worth}`; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,13 @@ |
|||
import { Pipe, PipeTransform } from '@angular/core'; |
|||
|
|||
@Pipe({ |
|||
name: 'productcouponWorth' |
|||
}) |
|||
export class ProductCouponWorthPipe implements PipeTransform { |
|||
|
|||
transform(value: number,rate:number): string { |
|||
var worth = (rate * value)/100; |
|||
return `GH¢ ${worth}`; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,20 @@ |
|||
import { Pipe, PipeTransform } from "@angular/core"; |
|||
|
|||
@Pipe({ |
|||
name: 'productNameShort' |
|||
}) |
|||
export class ProductNameShort implements PipeTransform { |
|||
|
|||
constructor( |
|||
) { } |
|||
|
|||
transform(value: string): string { |
|||
|
|||
if (value.length > 70) { |
|||
return value.substring(0, 66) + "...."; |
|||
} else { |
|||
return value; |
|||
} |
|||
} |
|||
|
|||
} |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 68 KiB |
After Width: | Height: | Size: 111 KiB |
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 10 KiB |
@ -1,3 +1,5 @@ |
|||
export const environment = { |
|||
production: true |
|||
production: true, |
|||
apiURL:"https://test.tesoapp.com/v2/" |
|||
// apiURL:"https://localhost:7076/"
|
|||
}; |
|||
|
After Width: | Height: | Size: 126 KiB |
@ -0,0 +1,51 @@ |
|||
{ |
|||
"name": "Teso Business", |
|||
"short_name": "Teso Business", |
|||
"theme_color": "#1976d2", |
|||
"background_color": "#fafafa", |
|||
"display": "standalone", |
|||
"scope": "./", |
|||
"start_url": "./", |
|||
"icons": [ |
|||
{ |
|||
"src": "assets/icons/icon-72_x_72.png", |
|||
"sizes": "72x72", |
|||
"type": "image/png" |
|||
}, |
|||
{ |
|||
"src": "assets/icons/icon-96_x_96.png", |
|||
"sizes": "96x96", |
|||
"type": "image/png" |
|||
}, |
|||
{ |
|||
"src": "assets/icons/icon-128_x_128.png", |
|||
"sizes": "128x128", |
|||
"type": "image/png" |
|||
}, |
|||
{ |
|||
"src": "assets/icons/icon-144_x_144.png", |
|||
"sizes": "144x144", |
|||
"type": "image/png" |
|||
}, |
|||
{ |
|||
"src": "assets/icons/icon-152_x_152.png", |
|||
"sizes": "152x152", |
|||
"type": "image/png" |
|||
}, |
|||
{ |
|||
"src": "assets/icons/icon-192_x_192.png", |
|||
"sizes": "192x192", |
|||
"type": "image/png" |
|||
}, |
|||
{ |
|||
"src": "assets/icons/icon-384_x_384.png", |
|||
"sizes": "384x384", |
|||
"type": "image/png" |
|||
}, |
|||
{ |
|||
"src": "assets/icons/icon-512_x_512.png", |
|||
"sizes": "512x512", |
|||
"type": "image/png" |
|||
} |
|||
] |
|||
} |