@capillarytech/creatives-library 7.17.53 → 7.17.55
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
|
@@ -666,14 +666,14 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
666
666
|
this.setState({ selectedAccountError: false });
|
|
667
667
|
}
|
|
668
668
|
} else if ([LINE.toLowerCase(), RCS_LOWERCASE, ZALO_LOWERCASE].includes(selectedChannel)) {
|
|
669
|
-
const setAcc = this.props
|
|
669
|
+
const setAcc = this.props?.Templates?.weCrmAccounts?.find((item) => item?.name === this.state.selectedAccount);
|
|
670
670
|
this.props.actions.setChannelAccount(selectedChannel?.toUpperCase(), setAcc);
|
|
671
671
|
if(selectedChannel === ZALO_LOWERCASE){
|
|
672
672
|
const {
|
|
673
673
|
name = "",
|
|
674
674
|
sourceAccountIdentifier = "",
|
|
675
675
|
configs: { token = "" } = {},
|
|
676
|
-
} = setAcc;
|
|
676
|
+
} = setAcc || {};
|
|
677
677
|
params.username = name;
|
|
678
678
|
params.oa_id = sourceAccountIdentifier;
|
|
679
679
|
params.token = token;
|
|
@@ -817,7 +817,20 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
817
817
|
}
|
|
818
818
|
if ((this.state.channel || '').toLowerCase() === SMS_LOWERCASE && isTraiDltFeature) {
|
|
819
819
|
queryParams.traiEnable = true;
|
|
820
|
-
}
|
|
820
|
+
}
|
|
821
|
+
if (
|
|
822
|
+
this.state.channel.toLowerCase() === ZALO_LOWERCASE &&
|
|
823
|
+
!isEmpty(this.props.Templates?.selectedZaloAccount)
|
|
824
|
+
) {
|
|
825
|
+
const {
|
|
826
|
+
name = "",
|
|
827
|
+
sourceAccountIdentifier = "",
|
|
828
|
+
configs: { token = "" } = {},
|
|
829
|
+
} = get(this.props, "Templates.selectedZaloAccount", {});
|
|
830
|
+
queryParams.username = name;
|
|
831
|
+
queryParams.oa_id = sourceAccountIdentifier;
|
|
832
|
+
queryParams.token = token;
|
|
833
|
+
}
|
|
821
834
|
this.setState({ page, templatesCount }, () => {
|
|
822
835
|
queryParams.page = page;
|
|
823
836
|
queryParams.perPage = this.state.perPageLimit;
|