-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed and improved service area creation and added ability to add cir…
…cle service areas
- Loading branch information
Showing
12 changed files
with
268 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<div class="portal-content-wrapper"> | ||
<div class="grid grid-cols-1 md:grid-cols-12 gap-4"> | ||
<div class="lg:col-span-2 md:col-span-3"> | ||
<div class="customer-orders-section-header"> | ||
<div> | ||
<h1>Orders</h1> | ||
</div> | ||
<div class="customer-orders-list-content"> | ||
{{#each this.orders as |order|}} | ||
<a href="javascript:;" class="flex border border-black rounded-md shadow-sm bg-gray-200 px-4 mb-2" {{on "click" (fn this.selectOrder order)}}>{{order.public_id}}</a> | ||
{{/each}} | ||
</div> | ||
</div> | ||
</div> | ||
<div class="lg:col-span-10 md:col-span-9"> | ||
<div class="font-semibold"> | ||
Render order here using selected order: | ||
{{n-a this.selectedOrder.id}} | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import Component from '@glimmer/component'; | ||
import { tracked } from '@glimmer/tracking'; | ||
import { inject as service } from '@ember/service'; | ||
import { action } from '@ember/object'; | ||
import { task } from 'ember-concurrency'; | ||
|
||
export default class CustomerOrdersComponent extends Component { | ||
@service store; | ||
@service notifications; | ||
@service currentUser; | ||
@tracked orders = []; | ||
@tracked selectedOrder; | ||
|
||
constructor() { | ||
super(...arguments); | ||
this.loadCustomerOrders.perform(); | ||
} | ||
|
||
@task *loadCustomerOrders() { | ||
try { | ||
this.orders = yield this.store.query('order', { customer: this.currentUser.id }); | ||
} catch (error) { | ||
this.notifications.serverError(error); | ||
} | ||
} | ||
|
||
@action selectOrder(order) { | ||
this.selectedOrder = order; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.