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
12 changes: 6 additions & 6 deletions frontend/src/app/accounting/accounting.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ <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>
Expand All @@ -29,9 +29,9 @@ <h1 translate>ACCOUNTING</h1>
<div *ngIf="!element.delivered" class="error" translate>LABEL_IN_TRANSIT</div>
<div *ngIf="element.delivered" class="confirmation" translate>LABEL_DELIVERED</div>
</mat-cell>
</ng-container>
</ng-container> -->

<ng-container matColumnDef="StatusButton">
<!-- <ng-container matColumnDef="StatusButton">
<mat-header-cell *matHeaderCellDef fxFlex="15%"></mat-header-cell>
<mat-cell *matCellDef="let element" fxFlex="15%">
<button *ngIf="element.delivered" mat-icon-button aria-label="Print order confirmation"
Expand All @@ -49,7 +49,7 @@ <h1 translate>ACCOUNTING</h1>
</mat-icon>
</button>
</mat-cell>
</ng-container>
</ng-container> -->

<mat-header-row *matHeaderRowDef="orderHistoryColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: orderHistoryColumns;"></mat-row>
Expand Down
12 changes: 6 additions & 6 deletions routes/address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
import { type Request, type Response } from 'express'
import { AddressModel } from '../models/address'

module.exports.getAddress = function getAddress () {
return async (req: Request, res: Response) => {
const addresses = await AddressModel.findAll({ where: { UserId: req.body.UserId } })
res.status(200).json({ status: 'success', data: addresses })
}
}
// module.exports.getAddress = function getAddress () {
// return async (req: Request, res: Response) => {
// const addresses = await AddressModel.findAll({ where: { UserId: req.body.UserId } })
// res.status(200).json({ status: 'success', data: addresses })
// }
// }

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