Joywork/templates/room_reservation.php
2026-05-22 21:21:54 +03:00

191 lines
13 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- Бронирование -->
<div class="full_modal-bg hidden" style="z-index: 99987" id="room_reservation" v-if="isShow">
<span class="pseudo-link closer">
<i @click="closeForm" class="ti-close"></i>
</span>
<div class="full_modal edit-modal new-client__modal">
<div class="modal-inner" style="max-height: 75vh; overflow-y: auto;">
<h2 class="modal-title">Бронирование по ({{apartmentTitle}})</h2>
<div class="tabs__content">
<div class="form-block">
<div>
<template v-if="inProgress">
<div style="text-align:center; margin-top: 25px;">
<img src="../images/rocket-spinner.svg" width="96px">
</div>
</template>
<div v-else-if="reservation" class="clients">
<div class="client" :id="`reservation__${reservation.id}`">
<div class="client-inner">
<div class="additional-info">
<div class="date">{{ reservation.date_add }}</div>
<div class="type" v-html="reservation.name_type"></div>
<div class="stagebar">
<div v-if="reservation.funnel_id == 0" class="crm__small-stagebar" style="height: 8px; overflow: hidden; width: 220px;">
<table>
<tbody>
<tr>
<td v-for="(step, index) in reservation.steps.bar" :key="`reservation_step_bar_${step.id}`" class="stage" :class="[{ active: step.id <= reservation.steps.stageId }, step.classF]" :title="step.title">
<div :data-stage="step.id" :data-req="reservation.id" class="crm__small-stage"></div>
<span class="next-stage" v-html="step.name"></span>
</td>
</tr>
</tbody>
</table>
</div>
<div v-else-if="reservation.funnel_id > 0" class="crm__small-stagebar" style="height: 8px; overflow: hidden; width: 220px;">
<table>
<tbody>
<tr>
<td v-for="(step, index) in reservation.steps.bar" :key="`reservation_step_bar_${step.id}`" :class="'stage stage-funnel'+step.classF+' stageFunnel__'+step.id"
:title="step.name">
<div :data-stage="step.id"
:data-req="reservation.id"
:data-main="step.main"
class="crm__small-step">
</div>
<span class="next-stage">{{ step.name }}</span>
</td>
</tr>
<tr>
<td :colspan="reservation.steps.bar.length">
<span class="stepError" :id="'step_funnel_error'+index"></span>
</td>
</tr>
</tbody>
</table>
</div>
<?php
if (isset($_POST['funnel']) && $_POST['funnel'] == 'all') {
if ($client['funnel_id'] == 0) {
$name_funnel = "Обычные";
} else {
$sql_fun = "SELECT name FROM funnel WHERE id = " . $client['funnel_id'];
$name_funnel = mysql_fetch_assoc(mysql_query($sql_fun))['name'];
}
?>
<div style="padding-left: 5px;" class="client-added">
<div class="client-added__work"> <?= $name_funnel ?></div>
</div>
<?php
}
?>
</div>
<div v-if="reservation.deleted == 1" class="stagebar-title" v-html="reservation.steps.stage+' (закрыт)'"></div>
<div v-else class="stagebar-title" v-html="reservation.steps.stage"></div>
<div class="type"></div>
<div class="actions">
<a href="javascript:{};" @click="getReq(index)" class="no-border" title="Редактировать">
<span class="simple-button settings"><i class="jw-action-icon-settings"></i></span>
</a>
<a v-if="reservation.deleted==0" href="javascript:{}" :data-req="reservation.id" class="delClientAgent no-border" title="Закрыть">
<span class="simple-button settings"><i class="ti-close"></i></span>
</a>
</div>
</div>
<div class="client-name">
<h2><a class="toggleClient" @click=toggleClient(index) href="javascript:{}">{{ reservation.name }}</a></h2>
<div v-if="reservation.priority>0" class="client-priority" title="Категория клиента">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_2" x="0px" y="0px" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve" width="24px" height="24px" class="">
<ellipse cx="256" cy="256" rx="144" ry="144" :class="'priority'+reservation.priority" />
</svg>
</div>
</div>
<div class="main-info" :class="{hidden: !reservation.isMainInfo}">
<div v-if="!isEmpty(reservation.complex_room_id)" class="col client-object">
<p class="small">Объект</p>
<p>
<b class="big">
<a :href="`/complexes/#/apartments/${reservation.complex_room_id}`" target="_blank" v-html="reservation.complex_room_number"></a>
</b>
</p>
</div>
<div v-if="!isEmpty(reservation.client)" class="col client-object">
<p class="small">Клиент</p>
<p>
<b class="big">
<a href="javascript:{};" :data-id="reservation.client.value" class="neweditClient" title="Подробно">
<span v-html="reservation.client.fio"></span>
</a>
</b>
<a style="border-bottom: none; font-size:18px; margin-left: 5px;" @click="openCardClient(reservation.client_id)" href="javascript:{}" title="История и Задачи (клиент)"><i class="fa fa-chalkboard-teacher"></i></a>
</p>
</div>
<div class="col">
<div class="jw__action-button">
<div class="jw__g-button req-events-new" :data-id="reservation.id">История и задачи</div>
</div>
</div>
<div class="clear"></div>
</div>
<div class="client-added">
<div class="client-added__by" v-html="'ID: '+reservation.id"></div>
<div class="client-added__by" v-html="'Добавил '+reservation.manager"></div>
<div class="client-added__work" v-if="reservation.confirm==0 && reservation.who_work > 0" v-html="'Должен принять в работу '+reservation.master_work"></div>
<template v-else-if="reservation.confirm>0 && reservation.who_work && reservation.deleted == 1">
<div class="client-added__work" v-html="'Был в работе у '+reservation.master_work"></div>
<div class="client-added__work" v-html="'Закрыл '+reservation.master_delete"></div>
</template>
<div v-else class="client-added__work" v-html="'В работе у '+reservation.master_work"></div>
<div v-if="!isEmpty(reservation.doer_yes)" class="client-added__work">Совместная работа:
<template v-for="(doer_fio, index) in reservation.doer_yes">
<span v-html="doer_fio" :key="`reservation_doer_yes_${index}`"></span><br>
</template>
</div>
<div v-if="!isEmpty(reservation.doer_no)" class="client-added__work">Приглашен к совместной работе:
<template v-for="(doer_fio, index) in reservation.doer_no">
<span v-html="doer_fio" :key="`reservation_doer_no_${index}`"></span><br>
</template>
</div>
</div>
<div v-if="!isEmpty(reservation.description)" class="client_row row_line" :class="{hidden: !reservation.isMainInfo}">
<p class="small">Описание</p>
<p class="desc" v-html="reservation.description"></p>
</div>
<div v-if="reservation.deleted > 0" class="client_row row_line" :class="{hidden: !reservation.isMainInfo}">
<p class="small">Причина закрытия</p>
<p class="desc" v-html="reservation.reason"></p>
</div>
</div>
</div>
<div class="clear"></div>
</div>
<div v-else class="empty-block">
<h1><i class="ti-na"></i></h1>
<h2>Бронирование не найдено</h2>
</div>
</div>
<div class="clear"></div>
</div>
</div>
</div>
</div>
</div>