preorderlogistcs fix fcp filter and fix multiple campaigns
This commit is contained in:
@@ -6,4 +6,8 @@
|
||||
|
||||
.sent-checkbox-wrapper .fa-check {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.col-form-label {
|
||||
padding-top: 0 !important
|
||||
}
|
||||
@@ -6,7 +6,7 @@ Vue.component('preorder-logistics', {
|
||||
<h4 class="header-title mb-3">Filter</h4>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<tt-select label="Kampagne" :options="campaigns" v-model="filters.preordercampaign_id" sm/>
|
||||
<tt-select label="Kampagne" :options="campaigns" v-model="filters.preordercampaign_id" sm multiple/>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<tt-select label="FCP" :options="fcps" v-model="filters.fcp" sm multiple searchable/>
|
||||
@@ -76,6 +76,7 @@ Vue.component('preorder-logistics', {
|
||||
isPrinting: false,
|
||||
isExporting: false,
|
||||
isExportingAndMarking: false,
|
||||
lastFcpInfoTime: null,
|
||||
campaigns: [{value: '', text: 'Alle'}],
|
||||
fcps: [],
|
||||
sentStatusOptions: [
|
||||
@@ -123,6 +124,21 @@ Vue.component('preorder-logistics', {
|
||||
this.filters.fcp = [];
|
||||
return;
|
||||
}
|
||||
|
||||
if (Array.isArray(this.filters.preordercampaign_id) && this.filters.preordercampaign_id.length !== 1) {
|
||||
this.fcps = [];
|
||||
this.filters.fcp = [];
|
||||
const now = new Date().getTime();
|
||||
if (!this.lastFcpInfoTime || now - this.lastFcpInfoTime > 7000) {
|
||||
this.lastFcpInfoTime = now;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
window.notify('info', 'Bitte wählen Sie genau eine Kampagne aus, um die FCPs zu laden.');
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await axios.get(`${window.TT_CONFIG.BASE_PATH}/Preorderlogistics/getFCPsForCampaign`, {
|
||||
params: {campaign_id: this.filters.preordercampaign_id}
|
||||
|
||||
Reference in New Issue
Block a user