@capillarytech/creatives-library 7.17.52 → 7.17.54
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,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});
|
|
@@ -819,7 +830,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
819
830
|
queryParams.username = name;
|
|
820
831
|
queryParams.oa_id = sourceAccountIdentifier;
|
|
821
832
|
queryParams.token = token;
|
|
822
|
-
}
|
|
833
|
+
}
|
|
823
834
|
this.setState({ page, templatesCount }, () => {
|
|
824
835
|
queryParams.page = page;
|
|
825
836
|
queryParams.perPage = this.state.perPageLimit;
|