Skip to content

Commit

Permalink
chore(crud): move create fulfilment and invoice action to modules
Browse files Browse the repository at this point in the history
  • Loading branch information
belsman committed Nov 16, 2024
1 parent e64d158 commit 4f16b16
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@
</ng-container>
</ng-container>

<ng-container rc-crud-actions>
<button
vcl-button
rc-append
class="square half-transparent button"
title="Submit Fulfillment"
>
<vcl-icon icon="mdi:send-outline" />
</button>
</ng-container>

<ng-container rc-crud-router-outlet>
<router-outlet />
</ng-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,26 @@
</ng-container>
</ng-container>

<ng-container rc-crud-actions>
<button
vcl-button
rc-append
class="square half-transparent button"
title="Create Invoice"
>
<vcl-icon icon="mdi:invoice-plus-outline" />
</button>

<button
vcl-button
rc-append
class="square half-transparent button"
title="Create Fulfillment"
>
<vcl-icon icon="mdi:send-outline" />
</button>
</ng-container>

<ng-container rc-crud-router-outlet>
<router-outlet />
</ng-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,49 +93,8 @@
</div>

<div class="loose-button-group">
<!-- TODO: Move these buttons to the feature orders module -->
<button
*ngIf="
isTriggerCreateInvoice &&
[EUrlSegment.View].includes(urlSegment)
"
(click)="onCreateInvoice(id)"
vcl-button
rc-append
class="square half-transparent button"
title="Create Invoice"
>
<vcl-icon icon="mdi:invoice-plus-outline" />
</button>

<!-- TODO: Move these buttons to the feature orders module -->
<!-- <button
*ngIf="
isTriggerCreateFulfillment &&
[EUrlSegment.View].includes(urlSegment)
"
(click)="onCreateFulfillment(id)"
vcl-button
rc-append
class="square half-transparent button"
title="Create Fulfillment"
>
<vcl-icon icon="mdi:send-outline" />
</button> -->

<button
*ngIf="
isTriggerSubmitFulfillment &&
[EUrlSegment.View].includes(urlSegment)
"
(click)="onSubmitFulfillment(id)"
vcl-button
rc-append
class="square half-transparent button"
title="Submit Fulfillment"
>
<vcl-icon icon="mdi:send-outline" />
</button>
<!-- Actions -->
<ng-container *ngTemplateOutlet="crudActions" />

<button
vcl-button
Expand Down Expand Up @@ -237,4 +196,8 @@
<ng-template #metaTemplate>
<ng-content select="[rc-crud-meta]" />
</ng-template>

<ng-template #crudActions>
<ng-content select="[rc-crud-actions]" />
</ng-template>
</ng-container>

0 comments on commit 4f16b16

Please sign in to comment.