Skip to content
Closed
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 addon/components/modals/create-food-truck.hbs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Modal::Default @modalIsOpened={{@modalIsOpened}} @options={{@options}} @confirm={{@onConfirm}} @decline={{@onDecline}}>
<div class="modal-body-container">
<InputGroup @name="Assign Food Truck Vehicle">
<InputGroup @name="Vehicle">
<ModelSelect
@modelName="vehicle"
@selectedItemComponent={{component "select-option/vehicle" compact=true}}
@selectedModel={{@options.foodTruck.vehicle}}
@placeholder="Assign Food Truck Vehicle"
@placeholder="Select the vehicle for this truck"
@triggerClass="form-select form-input"
@infiniteScroll={{false}}
@renderInPlace={{true}}
Expand All @@ -19,7 +19,7 @@
<ModelSelect
@modelName="service-area"
@selectedModel={{@options.foodTruck.service_area}}
@placeholder="Assign Food Truck to Service Area"
@placeholder="Assign the truck to a service area"
@triggerClass="form-select form-input"
@infiniteScroll={{false}}
@renderInPlace={{true}}
Expand All @@ -36,7 +36,7 @@
@modelName="zone"
@selectedModel={{@options.foodTruck.zone}}
@query={{hash service_area_uuid=@options.foodTruck.service_area.id}}
@placeholder="Assign Food Truck to Zone"
@placeholder="Assign the truck to a zone"
@triggerClass="form-select form-input"
@infiniteScroll={{false}}
@renderInPlace={{true}}
Expand All @@ -48,11 +48,11 @@
</ModelSelect>
</InputGroup>
{{/if}}
<InputGroup @name="Food Truck Status">
<InputGroup @name="Truck Status">
<Select
class="w-full"
@value={{@options.foodTruck.status}}
@placeholder="Select food truck status"
@placeholder="Select truck status"
@options={{@options.statusOptions}}
@onSelect={{fn (mut @options.foodTruck.status)}}
@humanize={{true}}
Expand Down
12 changes: 12 additions & 0 deletions addon/components/select-option/store.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Resource::SelectOption
@option={{or @option @model @store}}
@resourceType="store"
@compact={{@compact}}
@title={{@title}}
@details={{@details}}
@photo={{@photo}}
@fallbackPhoto={{@fallbackPhoto}}
@icon={{@icon}}
@shape={{@shape}}
...attributes
/>
34 changes: 20 additions & 14 deletions addon/components/store-selector.hbs
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
{{#if @activeStore}}
<div class={{@wrapperClass}} {{did-insert this.setupTrigger}} {{will-destroy this.close}} ...attributes>
<Button
title={{@activeStore.name}}
class="{{concat "w-full " @buttonClass}} {{if this.isOpen "dd-is-open"}}"
@wrapperClass={{concat "w-full " @buttonWrapperClass}}
@size="xs"
@type="primary"
@icon="store"
@iconSize="sm"
@text={{@activeStore.name}}
@textClass="truncate"
@onClick={{this.toggle}}
/>
{{#if this.activeContext}}
<div class="storefront-switcher {{@wrapperClass}}" {{did-insert this.setupTrigger}} {{will-destroy this.close}} ...attributes>
<button
type="button"
class="storefront-switcher__trigger storefront-switcher__trigger--{{if this.isNetworkContext 'network' 'store'}} {{if this.isOpen 'is-open'}} {{@buttonClass}}"
title={{concat this.contextLabel ": " this.activeContext.name}}
aria-haspopup="menu"
aria-expanded={{if this.isOpen "true" "false"}}
data-test-store-selector-trigger
data-context={{if this.isNetworkContext "network" "store"}}
{{on "click" this.toggle}}
>
<span class="storefront-switcher__icon"><FaIcon @icon={{if this.isNetworkContext "network-wired" "store"}} @size="sm" /></span>
<span class="storefront-switcher__name">{{this.activeContext.name}}</span>
<span class="storefront-switcher__kind">{{this.contextLabel}}</span>
<span class="storefront-switcher__caret"><FaIcon @icon="chevron-down" @size="xs" /></span>
{{#if this.badge}}
<span class="storefront-switcher__badge" title={{t "storefront.component.store-selector.badge-title" count=this.badge}} data-test-store-selector-badge>{{this.badge}}</span>
{{/if}}
</button>
</div>
{{else if (has-block)}}
{{yield}}
Expand Down
Loading