Skip to content

Commit

Permalink
fix(com-pwa): back to admin-order-list & add the missing this param
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammadhonarvar committed May 29, 2023
1 parent 7bb5ade commit 23bb08f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion uniquely/com-pwa/src/ui/page/admin-order-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class AlwatrPageAdminOrderList extends ScheduleUpdateToFrameMixin(
reloadingFailed: 'complete',
reloading: 'complete',
complete: this._renderStateComplete,
});
}, this);
}

protected _renderStateLoading(): unknown {
Expand Down
8 changes: 5 additions & 3 deletions uniquely/com-pwa/src/ui/page/admin-order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {message, number, replaceNumber} from '@alwatr/i18n';
import '@alwatr/icon';
import {calcDiscount} from '@alwatr/math';
import {redirect} from '@alwatr/router';
import {subscribe} from '@alwatr/signal/src/core.js';
import {eventListener} from '@alwatr/signal';
import {AlwatrDocumentStorage} from '@alwatr/type';
import {Order, OrderDraft, OrderItem, OrderShippingInfo, Product} from '@alwatr/type/customer-order-management.js';
import '@alwatr/ui-kit/card/icon-box.js';
Expand Down Expand Up @@ -169,7 +169,9 @@ export class AlwatrPageAdminOrder extends UnresolvedMixin(LocalizeMixin(SignalMi
super.connectedCallback();

this._addSignalListeners(
subscribe(buttons.backToOrderList.clickSignalId, (): void => redirect({sectionList: ['admin-order-list']})),
eventListener.subscribe(buttons.backToOrderList.clickSignalId, (): void => {
redirect({sectionList: ['admin-order-list']});
}),
);
}

Expand All @@ -190,7 +192,7 @@ export class AlwatrPageAdminOrder extends UnresolvedMixin(LocalizeMixin(SignalMi
reloadingFailed: 'complete',
reloading: 'complete',
complete: this._renderStateComplete,
});
}, this);
}

protected _renderStateLoading(): unknown {
Expand Down
12 changes: 9 additions & 3 deletions uniquely/com-pwa/src/ui/stuff/user-inc-order-box.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ export class alwatrUserIncOrderBox extends LocalizeMixin(SignalMixin(AlwatrBaseE
.empty-order {
padding: calc(2 * var(--sys-spacing-track));
}
a {
display: block;
color: inherit;
text-decoration: none;
}
`;

@property()
Expand All @@ -79,15 +85,15 @@ export class alwatrUserIncOrderBox extends LocalizeMixin(SignalMixin(AlwatrBaseE
<alwatr-icon-box .content=${userProfileIconBox}>
<div class="detail-container">
<div>
<span>${message('page_admin_order_list_phone_number')}:</span>
<span>${message('page_admin_order_list_phone_number')}: </span>
<span dir="ltr">+${this.userIncOrder?.phoneNumber}</span>
</div>
<div>
<span>${message('page_admin_order_list_province')}:</span>
<span>${message('page_admin_order_list_province')}: </span>
<span>${this.userIncOrder?.province}</span>
</div>
<div>
<span>${message('page_admin_order_list_city')}:</span>
<span>${message('page_admin_order_list_city')}: </span>
<span>${this.userIncOrder?.city}</span>
</div>
</div>
Expand Down

0 comments on commit 23bb08f

Please sign in to comment.