-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
edited product form panel based on task
- Loading branch information
1 parent
89e093b
commit 33cb9f2
Showing
8 changed files
with
150 additions
and
127 deletions.
There are no files selected for viewing
Empty file.
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,20 @@ | ||
<div class="relative flex items-center"> | ||
<img src={{this.mediaUrl}} alt={{this.altText}} class="w-16 h-16 rounded-full mb-2" /> | ||
<span class="relative block"> | ||
<a href="javascript:;" class="text-blue-500" {{on "click" this.onClick}}> | ||
{{#if (has-block)}} | ||
{{yield}} | ||
{{else}} | ||
<span class="font-bold text-lg"> | ||
{{@product.name}} | ||
</span> | ||
<p class="text-gray-700 text-sm"> | ||
{{@product.description}} | ||
</p> | ||
{{/if}} | ||
</a> | ||
</span> | ||
{{#if @showOnlineIndicator}} | ||
<FaIcon @icon="circle" class="absolute left-0 top-0 {{if @product.online "text-green-500" "text-yellow-200"}}" /> | ||
{{/if}} | ||
</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,3 @@ | ||
import Component from '@glimmer/component'; | ||
|
||
export default class CellProductInfoComponent extends Component {} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from '@fleetbase/pallet-engine/components/cell/product-info'; |
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,26 @@ | ||
import { module, test } from 'qunit'; | ||
import { setupRenderingTest } from 'dummy/tests/helpers'; | ||
import { render } from '@ember/test-helpers'; | ||
import { hbs } from 'ember-cli-htmlbars'; | ||
|
||
module('Integration | Component | cell/product-info', function (hooks) { | ||
setupRenderingTest(hooks); | ||
|
||
test('it renders', async function (assert) { | ||
// Set any properties with this.set('myProperty', 'value'); | ||
// Handle any actions with this.set('myAction', function(val) { ... }); | ||
|
||
await render(hbs`<Cell::ProductInfo />`); | ||
|
||
assert.dom(this.element).hasText(''); | ||
|
||
// Template block usage: | ||
await render(hbs` | ||
<Cell::ProductInfo> | ||
template block text | ||
</Cell::ProductInfo> | ||
`); | ||
|
||
assert.dom(this.element).hasText('template block text'); | ||
}); | ||
}); |