@capillarytech/creatives-library 7.17.52 → 7.17.53
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 +1 -1
- package/v2Containers/Templates/index.js +13 -15
package/package.json
CHANGED
|
@@ -666,7 +666,18 @@ 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
|
-
|
|
669
|
+
const setAcc = this.props.Templates.weCrmAccounts.find((item) => item.name === this.state.selectedAccount);
|
|
670
|
+
this.props.actions.setChannelAccount(selectedChannel?.toUpperCase(), setAcc);
|
|
671
|
+
if(selectedChannel === ZALO_LOWERCASE){
|
|
672
|
+
const {
|
|
673
|
+
name = "",
|
|
674
|
+
sourceAccountIdentifier = "",
|
|
675
|
+
configs: { token = "" } = {},
|
|
676
|
+
} = setAcc;
|
|
677
|
+
params.username = name;
|
|
678
|
+
params.oa_id = sourceAccountIdentifier;
|
|
679
|
+
params.token = token;
|
|
680
|
+
}
|
|
670
681
|
}
|
|
671
682
|
|
|
672
683
|
this.setState({activeMode: TEMPLATES_MODE});
|
|
@@ -806,20 +817,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
806
817
|
}
|
|
807
818
|
if ((this.state.channel || '').toLowerCase() === SMS_LOWERCASE && isTraiDltFeature) {
|
|
808
819
|
queryParams.traiEnable = true;
|
|
809
|
-
}
|
|
810
|
-
if (
|
|
811
|
-
this.state.channel.toLowerCase() === ZALO_LOWERCASE &&
|
|
812
|
-
!isEmpty(this.props.Templates?.selectedZaloAccount)
|
|
813
|
-
) {
|
|
814
|
-
const {
|
|
815
|
-
name = "",
|
|
816
|
-
sourceAccountIdentifier = "",
|
|
817
|
-
configs: { token = "" } = {},
|
|
818
|
-
} = get(this.props, "Templates.selectedZaloAccount", {});
|
|
819
|
-
queryParams.username = name;
|
|
820
|
-
queryParams.oa_id = sourceAccountIdentifier;
|
|
821
|
-
queryParams.token = token;
|
|
822
|
-
}
|
|
820
|
+
}
|
|
823
821
|
this.setState({ page, templatesCount }, () => {
|
|
824
822
|
queryParams.page = page;
|
|
825
823
|
queryParams.perPage = this.state.perPageLimit;
|