Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions frontend/src/app/accounting/accounting.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ <h1 translate>ACCOUNTING</h1>
<div class="heading">
<span translate>TITLE_TRACK_ORDERS</span>
</div>
<mat-table [dataSource]="orderSource">
<!-- <mat-table [dataSource]="orderSource">
<ng-container matColumnDef="OrderId">
<mat-header-cell *matHeaderCellDef translate="LABEL_ORDER_ID" fxFlex="50%"></mat-header-cell>
<mat-cell *matCellDef="let element" fxFlex="50%"> {{element.orderId }}</mat-cell>
</ng-container>
</ng-container> -->

<ng-container matColumnDef="Price">
<!-- <ng-container matColumnDef="Price">
<mat-header-cell *matHeaderCellDef translate="LABEL_PRICE" fxFlex="15%"></mat-header-cell>
<mat-cell *matCellDef="let element" fxFlex="15%"> {{element.totalPrice?.toFixed(2) }}&curren;</mat-cell>
</ng-container>

<ng-container matColumnDef="Status">
<ng-container matColumnDef="Status">
<mat-header-cell *matHeaderCellDef translate="LABEL_STATUS" fxFlex="20%"></mat-header-cell>
<mat-cell *matCellDef="let element" fxFlex="20%">
<div *ngIf="!element.delivered" class="error" translate>LABEL_IN_TRANSIT</div>
Expand Down
20 changes: 10 additions & 10 deletions routes/address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ module.exports.getAddress = function getAddress () {
}
}

module.exports.getAddressById = function getAddressById () {
return async (req: Request, res: Response) => {
const address = await AddressModel.findOne({ where: { id: req.params.id, UserId: req.body.UserId } })
if (address != null) {
res.status(200).json({ status: 'success', data: address })
} else {
res.status(400).json({ status: 'error', data: 'Malicious activity detected.' })
}
}
}
// module.exports.getAddressById = function getAddressById () {
// return async (req: Request, res: Response) => {
// const address = await AddressModel.findOne({ where: { id: req.params.id, UserId: req.body.UserId } })
// if (address != null) {
// res.status(200).json({ status: 'success', data: address })
// } else {
// res.status(400).json({ status: 'error', data: 'Malicious activity detected.' })
// }
// }
// }

module.exports.delAddressById = function delAddressById () {
return async (req: Request, res: Response) => {
Expand Down