Update formatting for list of orders

This commit is contained in:
Rene Vergara 2022-07-26 10:00:17 -05:00
parent 0b9419c41f
commit 946828563c
Signed by: pitmutt
GPG key ID: 65122AD495A7F5B2
5 changed files with 32 additions and 31 deletions

View file

@ -51,18 +51,18 @@ img.icon{
} }
.total{ .total{
font-family: Roboto Mono; font-family:'Roboto Mono';
margin: auto; margin: auto;
} }
.tbheader { .tbheader {
font-family: Roboto Mono; font-family: 'Roboto Mono';
font-size: 14px; font-size: 14px;
font-weight: 700; font-weight: 700;
} }
.tbdetail { .tbdetail {
font-family: Roboto Mono; font-family: 'Roboto Mono';
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
} }
@ -76,7 +76,7 @@ img.icon{
} }
.totalsHdr { .totalsHdr {
font-family: Roboto Mono !important; font-family: 'Roboto Mono' !important;
text-align: center; text-align: center;
margin-bottom: 50px; margin-bottom: 50px;
} }
@ -93,10 +93,11 @@ img.icon{
} }
.orderList { .orderList {
font-family: Roboto Mono !important; font-family: 'Roboto Mono' !important;
} }
.orderListTitle { .orderListTitle {
font-family: 'Roboto Mono';
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
} }
@ -105,4 +106,12 @@ img.icon{
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
text-align: justify; text-align: justify;
} }
.minibutton {
font-family: 'Spartan', sans-serif;
}
.spacer {
flex: 1 1 auto;
}

View file

@ -59,7 +59,7 @@
<table style="width: 100%;" <table style="width: 100%;"
cellspacing="0"> cellspacing="0">
<tr style="font-family: Roboto Mono; <tr style="font-family: 'Roboto Mono';
font-weight: 700; font-weight: 700;
font-size: 16px; font-size: 16px;
height: 20px;"> height: 20px;">
@ -70,7 +70,7 @@
>{{ order.totalZec | number: '1.08'}} >{{ order.totalZec | number: '1.08'}}
</td> </td>
</tr> </tr>
<tr style="font-family: Roboto Mono; <tr style="font-family: 'Roboto Mono';
font-size: 15px; font-size: 15px;
font-weight: 400; font-weight: 400;
height: 18px;"> height: 18px;">
@ -122,19 +122,13 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div style="display: flex; <div align="center">
justify-content: space-between; <span>
padding: 5px; <button mat-stroked-button class="minibutton" color="primary" (click)="invoice(order)">Invoice</button>
height: 25px; </span>
background: lightblue; <span>
cursor: pointer;"> <button mat-stroked-button class="minibutton" color="primary" (click)="receipt(order)">Receipt</button>
<button style="background: #ff5722; </span>
color: white;"
(click)="invoice(order)">Invoice</button>
<button style="background: #ff5722;
color: white;"
(click)="receipt(order)">Receipt</button>
</div> </div>
</mat-expansion-panel> </mat-expansion-panel>
</mat-accordion> </mat-accordion>

View file

@ -60,7 +60,6 @@ export class ListOrdersComponent implements OnInit, OnDestroy{
this.todayTotal = 0; this.todayTotal = 0;
var today = new Date(); var today = new Date();
this.orders = orders; this.orders = orders;
console.log('lisord', this.orders.length);
for (let i=0; i < this.orders.length; i++){ for (let i=0; i < this.orders.length; i++){
this.total += this.orders[i].totalZec; this.total += this.orders[i].totalZec;
var date = new Date(this.orders[i]!.timestamp!); var date = new Date(this.orders[i]!.timestamp!);

View file

@ -205,6 +205,7 @@ export class LoginComponent implements OnInit, AfterViewInit {
this.userService.validateUser(this.pinForm.value.pinValue).subscribe((val) => { this.userService.validateUser(this.pinForm.value.pinValue).subscribe((val) => {
if (val) { if (val) {
this.router.navigate(['/biz']); this.router.navigate(['/biz']);
clearInterval(this.intervalHolder);
} else { } else {
this.pinError = true; this.pinError = true;
} }

View file

@ -152,10 +152,10 @@ export class UserService{
let obs = this.http.post(this.beUrl+'api/owner', {payload: owner}, {headers: this.reqHeaders}); let obs = this.http.post(this.beUrl+'api/owner', {payload: owner}, {headers: this.reqHeaders});
obs.subscribe((responseData) => { obs.subscribe((responseData) => {
console.log("Entra a console log"); //console.log("Entra a console log");
this.getOwner(this.dataStore.user.address); this.getOwner(this.dataStore.user.address);
}, (error) => { }, (error) => {
console.log("Status is : [" + error.status + "]"); //console.log("Status is : [" + error.status + "]");
if ( error.status = 500 ) { if ( error.status = 500 ) {
this.notifierService this.notifierService
.showNotification("Invalid Viewing Key, changes not saved!!","Close",'error'); .showNotification("Invalid Viewing Key, changes not saved!!","Close",'error');
@ -171,14 +171,12 @@ export class UserService{
let obs = this.http.get<{message:string, owner: any}>(this.beUrl+'api/owner', { headers: this.reqHeaders, params: ownParams, observe: 'response'}); let obs = this.http.get<{message:string, owner: any}>(this.beUrl+'api/owner', { headers: this.reqHeaders, params: ownParams, observe: 'response'});
obs.subscribe((OwnerDataResponse) => { obs.subscribe((OwnerDataResponse) => {
console.log('api/getowner', OwnerDataResponse.status); //console.log('api/getowner', OwnerDataResponse.status);
if (OwnerDataResponse.status == 200) { if (OwnerDataResponse.status == 200) {
this.dataStore.owner = OwnerDataResponse.body!.owner; this.dataStore.owner = OwnerDataResponse.body!.owner;
console.log('getOwner object', this.dataStore.owner); //console.log('getOwner object', this.dataStore.owner);
console.log('Payment Conf.?: [' + ( //console.log('Payment Conf.?: [' + ( this.dataStore.owner.payconf ? "On]" : "Off]") );
this.dataStore.owner.payconf ? "On]" : "Off]") ); //console.log('Viewkey : [' + this.dataStore.owner.viewkey + "]");
console.log('Viewkey : [' +
this.dataStore.owner.viewkey + "]");
this._ownerUpdated.next(Object.assign({},this.dataStore).owner); this._ownerUpdated.next(Object.assign({},this.dataStore).owner);
this._paidUpdated.next(Object.assign({}, this.dataStore).owner.paid); this._paidUpdated.next(Object.assign({}, this.dataStore).owner.paid);
} }
@ -191,7 +189,7 @@ export class UserService{
let obs = this.http.delete<{message: string}>(this.beUrl+'api/user/'+this.dataStore.user._id, {headers: this.reqHeaders }); let obs = this.http.delete<{message: string}>(this.beUrl+'api/user/'+this.dataStore.user._id, {headers: this.reqHeaders });
obs.subscribe(UserResponse => { obs.subscribe(UserResponse => {
console.log('User delete request sent.'); //console.log('User delete request sent.');
this.findUser(); this.findUser();
}); });