Some bugfixes
This commit is contained in:
parent
a3983193d3
commit
8683f8c91e
6 changed files with 12 additions and 8 deletions
|
@ -74,7 +74,7 @@ export class TestSendModalDialog extends Component {
|
|||
data.sendConfigurationId = props.entity.send_configuration;
|
||||
data.campaignId = props.entity.id;
|
||||
|
||||
console.log(await axios.post(getUrl('rest/template-test-send'), data));
|
||||
await axios.post(getUrl('rest/template-test-send'), data);
|
||||
|
||||
this.clearFormStatusMessage();
|
||||
|
||||
|
|
|
@ -286,7 +286,11 @@ export default class CUD extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
onFileSelected() {
|
||||
onFileSelected(evt, x) {
|
||||
if (!this.getFormValue('name') && this.csvFile.files.length > 0) {
|
||||
this.updateFormValue('name', this.csvFile.files[0].name);
|
||||
}
|
||||
|
||||
this.scheduleFormRevalidate();
|
||||
}
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ export class TestSendModalDialog extends Component {
|
|||
data.subscriptionCid = this.getFormValue('testUser');
|
||||
data.sendConfigurationId = this.getFormValue('sendConfiguration');
|
||||
|
||||
console.log(await axios.post(getUrl('rest/template-test-send'), data));
|
||||
await axios.post(getUrl('rest/template-test-send'), data);
|
||||
|
||||
this.clearFormStatusMessage();
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ async function ajaxListWithPermissionsTx(tx, context, fetchSpecs, params, queryF
|
|||
|
||||
query = query.innerJoin(
|
||||
function () {
|
||||
return this.from(entityType.permissionsTable).select('entity').where('user', context.user.id).whereIn('operation', fetchSpec.requiredOperations).as(`permitted__${fetchSpec.entityTypeId}`);
|
||||
return this.from(entityType.permissionsTable).distinct('entity').where('user', context.user.id).whereIn('operation', fetchSpec.requiredOperations).as(`permitted__${fetchSpec.entityTypeId}`);
|
||||
},
|
||||
`permitted__${fetchSpec.entityTypeId}.entity`, entityIdColumn)
|
||||
}
|
||||
|
|
|
@ -478,7 +478,7 @@ async function remove(context, id) {
|
|||
await triggers.removeAllByCampaignIdTx(tx, context, id);
|
||||
|
||||
await tx('template_dep_campaigns')
|
||||
.where('campaign', entity.id)
|
||||
.where('campaign', id)
|
||||
.del();
|
||||
|
||||
await tx('campaigns').where('id', id).del();
|
||||
|
|
|
@ -146,11 +146,11 @@ async function updateLinks(campaign, list, subscription, mergeTags, message) {
|
|||
}
|
||||
|
||||
if (!campaign.click_tracking_disabled) {
|
||||
const re = /(<a[^>]* href\s*=[\s"']*)(http[^"'>\s]+)/gi;
|
||||
const re = /(<a[^>]* href\s*=\s*["']\s*)(http[^"'>\s]+)/gi;
|
||||
|
||||
const urlsToBeReplaced = new Set();
|
||||
|
||||
message = message.replace(re, (match, prefix, encodedUrl) => {
|
||||
message.replace(re, (match, prefix, encodedUrl) => {
|
||||
const url = he.decode(encodedUrl, {isAttributeValue: true});
|
||||
urlsToBeReplaced.add(url);
|
||||
});
|
||||
|
@ -166,7 +166,7 @@ async function updateLinks(campaign, list, subscription, mergeTags, message) {
|
|||
message = message.replace(re, (match, prefix, encodedUrl) => {
|
||||
const url = he.decode(encodedUrl, {isAttributeValue: true});
|
||||
const link = urls.get(url);
|
||||
return getPublicUrl(`/links/${campaign.cid}/${list.cid}/${subscription.cid}/${link.cid}`);
|
||||
return prefix + (link ? getPublicUrl(`/links/${campaign.cid}/${list.cid}/${subscription.cid}/${link.cid}`) : url);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue