-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added extra check and toggle for custom statuses in conversation properties #869
Conversation
|
||
.fw-field-editor-status-toggle-item { | ||
display: grid; | ||
font-size: 14px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use scss variables instead of hard-coding the values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
></fw-input> | ||
</div> | ||
</span> | ||
<span>{toggle}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check if toggle
is truthy and then render the <span>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved the span to the condition above
@@ -571,6 +571,10 @@ export class FieldEditor { | |||
} | |||
} | |||
|
|||
if (this.dataProvider.name === 'status') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking for hardcode name like "status" will cause issues for other products. Can you add a config value in form-mapper.json which will check if the form builder supports toggle please. Add the name of the filed also in the same config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
@@ -571,6 +571,10 @@ export class FieldEditor { | |||
} | |||
} | |||
|
|||
if (this.dataProvider.name === 'status') { | |||
objValues['choices'] = this.dataProvider.choices; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you spread these choices please, just to avoid reference issues, if any
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
@@ -1059,6 +1116,9 @@ export class FieldEditor { | |||
const boolSupportInternalName = objProductConfig.editInternalName; | |||
const strBaseClassName = 'fw-field-editor'; | |||
const objFieldBuilder = this.fieldBuilderOptions; | |||
|
|||
/** Adding extra check for status type */ | |||
const isStatusType = objFormValue.name === 'status'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the name of the field in config as mentioned above and check if builder supports toggle feature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check changed
Checklist:
How Has This Been Tested?