Merge branch 'fronkdev' into 'master'
fixed status buttons in Preorder/index See merge request fronk/thetool!1760
This commit is contained in:
@@ -553,17 +553,26 @@ $pagination_entity_name = "Vorbestellungen";
|
||||
<i class="fas fa-fw fa-angle-down"></i>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<?php if(!$me->is("preorderfront")): ?><td><?=$preorder->campaign->name?></td><?php endif; ?>
|
||||
<?php if(!$me->is("preorderfront")): ?>
|
||||
<td>
|
||||
<?=$preorder->campaign->name?>
|
||||
<?php if($preorder->cancel_request && !$preorder->cancel_approved): ?>
|
||||
<br /><button class="btn btn-sm btn-outline-danger mt-1 cancel-approval-button" onclick="openCancelApproval(<?=$preorder->id?>)"><i class="fas fa-fw fa-eyes text-primary"></i> Kündigungsanfrage<?=($preorder->cancel_request_status_code) ? " (".$preorder->cancel_request_status_code.")" : ""?></button>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<td>
|
||||
<?=__($preorder->type, "preorder")?><br />
|
||||
<?=$preorder->ucode?>
|
||||
</td>
|
||||
<td class="status"><?=$preorder->status->code?> - <?=$preorder->status->name?>
|
||||
<td class="status">
|
||||
<?=$preorder->status->code?> - <?=$preorder->status->name?>
|
||||
<?php foreach(PreorderStatusflagModel::search(['ids' => [3,4]]) as $flag): ?>
|
||||
<br><input type="checkbox" class="preorder-statusflag-main"
|
||||
id="preorder-<?=$preorder->id?>-statusflag-<?=$flag->id?>"
|
||||
data-preorder_id="<?=$preorder->id?>"
|
||||
data-flag_id="<?=$flag->id?>"
|
||||
data-flag_code="<?=$flag->code?>"
|
||||
<?=(array_key_exists($flag->id, $preorder->statusflags) && $preorder->statusflags[$flag->id]->value && $preorder->statusflags[$flag->id]->value->value) ? "checked='checked'" : ""?>
|
||||
/>
|
||||
<label class="m-0" style="font-weight: unset!important;" for="preorder-<?=$preorder->id?>-statusflag-<?=$flag->id?>" id="preorder-<?=$preorder->id?>-statusflag-<?=$flag->id?>-text" class="text-nowrap">
|
||||
@@ -1866,6 +1875,25 @@ $pagination_entity_name = "Vorbestellungen";
|
||||
|
||||
}
|
||||
|
||||
function openCancelApproval(pid) {
|
||||
console.log(pid);
|
||||
if($('#preorder-detail-' + pid).is(":hidden")) {
|
||||
togglePreorder(pid);
|
||||
}
|
||||
|
||||
var mytab = $("a[href='#preorder-detail-" + pid + "-cancelation']");
|
||||
console.log(mytab);
|
||||
mytab.tab("show")
|
||||
}
|
||||
|
||||
function approveCancelRequest(pid) {
|
||||
console.log("approve");
|
||||
}
|
||||
|
||||
function denyCancelRequest(pid) {
|
||||
console.log("deny");
|
||||
}
|
||||
|
||||
/***********************
|
||||
* Email Log
|
||||
***********************/
|
||||
|
||||
Reference in New Issue
Block a user