Skip to content

Commit 05c802f

Browse files
committed
feat(fulfilment): hide the submit fulfilment button for non-pending fulfilments
1 parent 7078b5a commit 05c802f

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packages/modules/fulfillment/src/lib/components/template/fulfillment-template.component.html

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
</ng-container>
3434
</ng-container>
3535

36+
@if (vm.selectedFulfillment?.fulfillmentState ===
37+
FulfillmentFulfillmentState.Pending) {
3638
<ng-container rc-crud-actions>
3739
<button
3840
(click)="onSubmitFulfillment(vm.selectedFulfillmentId)"
@@ -44,6 +46,7 @@
4446
<vcl-icon icon="mdi:send-outline" />
4547
</button>
4648
</ng-container>
49+
}
4750

4851
<ng-container rc-crud-router-outlet>
4952
<router-outlet />

packages/modules/fulfillment/src/lib/components/template/fulfillment-template.component.ts

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { SubSink } from 'subsink';
1717
import { PAGINATION, ROUTER } from '@console-core/config';
1818
import {
1919
IIoRestorecommerceResourcebaseReadRequest,
20+
IoRestorecommerceFulfillmentFulfillmentState,
2021
IoRestorecommerceResourcebaseSortSortOrder,
2122
} from '@console-core/graphql';
2223
import { FulfillmentFacade, RouterFacade } from '@console-core/state';
@@ -32,6 +33,8 @@ export class FulfillmentTemplateComponent implements OnInit, OnDestroy {
3233
ROUTER = ROUTER;
3334
featureRouter = ROUTER.pages.main.children.fulfillments.children;
3435

36+
FulfillmentFulfillmentState = IoRestorecommerceFulfillmentFulfillmentState;
37+
3538
feature: Readonly<ICrudFeature> = {
3639
name: {
3740
plural: 'Fulfillments',

0 commit comments

Comments
 (0)