Skip to content

Commit

Permalink
feat(field-editor): i have added the sla timer toggle when we are pas…
Browse files Browse the repository at this point in the history
…sing the feature flag
  • Loading branch information
Elayaraman committed Apr 1, 2024
1 parent af9602b commit eb99d77
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1268,8 +1268,9 @@ export class FieldEditor {
const choices = objFormValue.choices;

const isSlaEnabled =
Object(choices[1].choice_options).keys.length > 1 ||
Object(choices[2].choice_options).keys.length > 1;
objFormValue.field_options.slaTimerEnabled &&
(Object(choices[1].choice_options).keys.length > 1 ||
Object(choices[2].choice_options).keys.length > 1);

const renderToggle = (id, name, checked) => (
<span>
Expand All @@ -1286,10 +1287,10 @@ export class FieldEditor {
<div
class={`${strBaseClassName}-status-toggle ${isSlaEnabled ? 'sla' : ''}`}
>
<div class={`${strBaseClassName}-item header`}>
<div class={`${strBaseClassName}-status-toggle-item header`}>
<span>{i18nText('fieldLabel')}</span>
<span>{i18nText('ertText')}</span>
(isSlaEnabled && <span>{i18nText('pstText')}</span>)
{isSlaEnabled && <span>{i18nText('pstText')}</span>}
</div>
{choices.map((dataItem) => {
return (
Expand Down

0 comments on commit eb99d77

Please sign in to comment.