Skip to content

Commit

Permalink
critical patch for StoreLocation http resource
Browse files Browse the repository at this point in the history
  • Loading branch information
roncodes committed Dec 20, 2023
1 parent 30dc3b0 commit bb68cdb
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion addon/components/modals/import-products.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{#if @options.isProcessing}}
<div class="min-h-56 dropzone w-full rounded px-4 py-8 min-h text-gray-900 dark:text-white text-center flex flex-col items-center justify-center border-2 border-dashed border-gray-200 dark:border-indigo-500">
<div class="flex items-center justify-center py-5">
<PageLoader class="text-sm dar:text-gray-100" @loadingMessage="Processing import..." />
<Spinner class="text-sm dark:text-gray-100" @loadingMessage="Processing import..." />
</div>
</div>
{{else}}
Expand Down
4 changes: 4 additions & 0 deletions addon/components/widget/orders.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export default class WidgetOrdersComponent extends Component {
return this.args.title ?? 'Recent Orders';
}

constructor() {
super(...arguments);
}

@action async setupWidget() {
later(
this,
Expand Down
15 changes: 15 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
const { buildEngine } = require('ember-engines/lib/engine-addon');
const { name } = require('./package');
const Funnel = require('broccoli-funnel');
const MergeTrees = require('broccoli-merge-trees');
const path = require('path');

module.exports = buildEngine({
name,
Expand All @@ -23,4 +25,17 @@ module.exports = buildEngine({
isDevelopingAddon() {
return true;
},

treeForPublic: function () {
const publicTree = this._super.treeForPublic.apply(this, arguments);

const addonTree = [
new Funnel(path.join(__dirname, 'assets'), {
destDir: '/',
}),
];

// Merge the addon tree with the existing tree
return publicTree ? new MergeTrees([publicTree, ...addonTree], { overwrite: true }) : new MergeTrees([...addonTree], { overwrite: true });
},
});
3 changes: 1 addition & 2 deletions server/src/Http/Resources/StoreLocation.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Fleetbase\Storefront\Http\Resources;

use Fleetbase\FleetOps\Http\Resources\v1\Place;
use Fleetbase\FleetOps\Http\Resources\Internal\v1\Place as InternalPlace;
use Fleetbase\Http\Resources\FleetbaseResource;
use Fleetbase\Support\Http;

Expand All @@ -24,7 +23,7 @@ public function toArray($request)
'store' => data_get($this, 'store.public_id'),
'store_data' => $this->when($request->boolean('with_store'), new Store($this->store)),
'name' => $this->name,
'place' => $this->when(Http::isInternalRequest(), new InternalPlace($this->place), new Place($this->place)),
'place' => $this->place ? new Place($this->place) : null,
'hours' => StoreHour::collection($this->hours),
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
Expand Down

0 comments on commit bb68cdb

Please sign in to comment.