@capillarytech/creatives-library 7.17.98 → 7.17.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -929,7 +929,8 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
929
929
|
}
|
|
930
930
|
// Check if template subject present in form data from Loyalty, DVS, Timeline
|
|
931
931
|
if (index === 'template-subject' && type.toLowerCase() === 'embedded' && (currentModule.toLowerCase() === 'loyalty' || currentModule.toLowerCase() === 'dvs' || currentModule.toLowerCase() === 'timeline' || currentModule.toLowerCase() === 'library')) {
|
|
932
|
-
|
|
932
|
+
//checking email subject name validation
|
|
933
|
+
if (!data?.trim()) {
|
|
933
934
|
errorData[index] = true;
|
|
934
935
|
isValid = false;
|
|
935
936
|
} else {
|
|
@@ -2069,7 +2069,8 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2069
2069
|
formData[0].selectedLanguages = [];
|
|
2070
2070
|
let tabKey;
|
|
2071
2071
|
if ((this.props.location.query.isLanguageSupport === undefined || this.props.location.query.isLanguageSupport === 'false')) {
|
|
2072
|
-
formData['template-subject']
|
|
2072
|
+
// If formData['template-subject'] is empty, assign an empty string; otherwise, retain its current value or use data.base.subject.
|
|
2073
|
+
formData['template-subject'] = formData?.['template-subject'] === '' ? '' : (data?.base?.subject || '');
|
|
2073
2074
|
const baseLanguage = this.props.currentOrgDetails.basic_details.base_language;
|
|
2074
2075
|
let languageIndex = _.findIndex(this.supportedLanguages, {iso_code: baseLanguage});
|
|
2075
2076
|
|
|
@@ -2134,16 +2135,17 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2134
2135
|
this.addLanguage(false, formData, false, additionalLanguages);
|
|
2135
2136
|
}
|
|
2136
2137
|
formData.base = _.cloneDeep(formData[0]);
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2138
|
+
if (formData?.['template-subject'] !== '') {
|
|
2139
|
+
this.setState({formData, loading: false, injectedTags: data.tags, tabKey, isDragDrop: (data.base.is_drag_drop !== 0 )}, () => {
|
|
2140
|
+
// this.setState({tabKey: ''});
|
|
2141
|
+
const isBEEEnable = this.checkBeeEditorAllowedForLibrary();
|
|
2142
|
+
_.forEach(formData[0].selectedLanguages, (language) => {
|
|
2143
|
+
if (formData[0][language].is_drag_drop && isBEEEnable) {
|
|
2144
|
+
this.props.actions.getCmsSetting(BEE_PLUGIN, formData[0][language].drag_drop_id, 'open', language, isEdmSupport, isBEEEnable);
|
|
2145
|
+
}
|
|
2146
|
+
});
|
|
2145
2147
|
});
|
|
2146
|
-
}
|
|
2148
|
+
}
|
|
2147
2149
|
} else {
|
|
2148
2150
|
this.setState({injectedTags: data.tags});
|
|
2149
2151
|
}
|