-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: enable feature to show all services when selecting services for…
… new inquiry
- Loading branch information
1 parent
67c24b6
commit 0bd35fd
Showing
8 changed files
with
176 additions
and
42 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
packages/distribution/addon/components/cd-inquiry-new-form/group-type.hbs
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,23 @@ | ||
{{! template-lint-disable require-presentational-children }} | ||
<tr | ||
class="uk-background-muted uk-text-bold" | ||
role="button" | ||
{{on "click" (fn (mut this.isExpanded) (not this.isExpanded))}} | ||
data-test-group-type={{@type.name}} | ||
> | ||
<td colspan="3" class=""> | ||
<div class="uk-flex uk-flex-between"> | ||
{{t @type.name}} | ||
<UkIcon @icon={{if this.isExpanded "chevron-up" "chevron-down"}} /> | ||
</div> | ||
</td> | ||
</tr> | ||
{{#if this.isExpanded}} | ||
{{#each @type.groups as |group|}} | ||
<CdInquiryNewForm::Group | ||
@group={{group}} | ||
@selectedGroups={{@selectedGroups}} | ||
@updateSelectedGroups={{@updateSelectedGroups}} | ||
/> | ||
{{/each}} | ||
{{/if}} |
15 changes: 15 additions & 0 deletions
15
packages/distribution/addon/components/cd-inquiry-new-form/group-type.js
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,15 @@ | ||
import Component from "@glimmer/component"; | ||
import { tracked } from "@glimmer/tracking"; | ||
|
||
export default class CdInquiryNewFormGroupTypeComponent extends Component { | ||
@tracked _isExpanded = true; | ||
|
||
get isExpanded() { | ||
// if we are searching all the groups need to be expanded anyway | ||
return this.args.search !== "" ? true : this._isExpanded; | ||
} | ||
|
||
set isExpanded(value) { | ||
this._isExpanded = value; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
packages/distribution/addon/components/cd-inquiry-new-form/group.hbs
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,25 @@ | ||
{{! template-lint-disable require-presentational-children }} | ||
<tr | ||
role="checkbox" | ||
data-test-group={{@group.identifier}} | ||
aria-checked={{includes @group.identifier @selectedGroups}} | ||
{{on "click" (fn @updateSelectedGroups @group.identifier)}} | ||
> | ||
<td class="uk-padding-remove-right"> | ||
{{! template-lint-disable require-input-label no-nested-interactive }} | ||
<input | ||
type="checkbox" | ||
class="uk-checkbox" | ||
checked={{includes @group.identifier @selectedGroups}} | ||
/> | ||
</td> | ||
<td class="uk-width-expand">{{group-name @group.identifier}}</td> | ||
<td class="uk-text-right"> | ||
{{#if @group.config.icon}} | ||
<UkIcon | ||
@icon={{@group.config.icon}} | ||
class="uk-display-block uk-text-{{@group.config.iconColor}}" | ||
/> | ||
{{/if}} | ||
</td> | ||
</tr> |
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
1 change: 1 addition & 0 deletions
1
packages/distribution/app/components/cd-inquiry-new-form/group-type.js
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 "@projectcaluma/ember-distribution/components/cd-inquiry-new-form/group-type"; |
1 change: 1 addition & 0 deletions
1
packages/distribution/app/components/cd-inquiry-new-form/group.js
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 "@projectcaluma/ember-distribution/components/cd-inquiry-new-form/group"; |
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