285 lines
21 KiB
Plaintext
285 lines
21 KiB
Plaintext
@model AccountManagement.Application.Contracts.Task.EditTaskPartialViewModel
|
|
@using System.Web
|
|
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
|
@using Version = _0_Framework.Application.Version
|
|
|
|
@{
|
|
int fileIndex = 0;
|
|
int i = 1;
|
|
<script src="~/AssetsClient/js/jquery-ui.js"></script>
|
|
<link href="~/assetsclient/css/task-manager-create.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
|
<link href="~/assetsadminnew/tasks/css/edit.css" rel="stylesheet" />
|
|
|
|
}
|
|
|
|
|
|
<div class="modal-content">
|
|
<div class="modal-header d-block text-center position-relative">
|
|
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
<h5 class="modal-title" id="morakhasiEstehghaghiModalLabel">ویرایش وظیفه</h5>
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
<div class="container-fluid">
|
|
<div class="row p-0">
|
|
<div class="card tm-create p-2">
|
|
<div class="col-12">
|
|
|
|
<form role="form" method="post" id="edit-form" enctype="multipart/form-data" autocomplete="off">
|
|
|
|
<input type="hidden" asp-for="EditTask.SenderId" />
|
|
<input type="hidden" asp-for="EditTask.Id" />
|
|
<div class="row">
|
|
<div class="col-12 col-lg-6 col-xl-4">
|
|
<div class="row">
|
|
<div class="col-3">
|
|
<div class="form-check form-checked">
|
|
@* <input class="form-check-input" type="radio" name="selectMemberOrGroup" id="memberSelect" checked> *@
|
|
<label class="form-check-label" for="memberSelect">
|
|
انتخاب اعضاء
|
|
</label>
|
|
</div>
|
|
</div>
|
|
<div class="col-9">
|
|
<div class="from-group" id="select2MemberList">
|
|
<select class="form-select select2Member" multiple="multiple" asp-for="EditTask.ReceiverId">
|
|
@if (Model.EditTask.ReceiverId.Any(x => x == Model.Id))
|
|
{
|
|
<option value="@Model.Id" selected>خودم</option>
|
|
}
|
|
else
|
|
{
|
|
<option value="@Model.Id">خودم</option>
|
|
}
|
|
@foreach (var item in Model.AccountList)
|
|
{
|
|
|
|
@if (Model.EditTask.ReceiverId.Any(x => x == item.Id))
|
|
{
|
|
<option value="@item.Id" selected>@item.Fullname</option>
|
|
}
|
|
else
|
|
{
|
|
<option value="@item.Id">@item.Fullname</option>
|
|
}
|
|
|
|
}
|
|
</select>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-12 col-lg-6 col-xl-4">
|
|
<div class="from-group position-relative">
|
|
<input type="text" asp-for="EditTask.ContractingPartyName" id="partyNameSearch" class="form-control" autocomplete="off" placeholder="طرف حساب">
|
|
<div id="partyName" class="selectDiv">
|
|
<ul class="searchResult">
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="from-group my-1">
|
|
<input type="text" asp-for="EditTask.Title" class="form-control m-0" placeholder="عنوان وظیفه">
|
|
</div>
|
|
</div>
|
|
<div class="col-12 col-md-8 col-lg-6 col-xl-4">
|
|
<div class="row">
|
|
<div class="col-8">
|
|
<div class="from-group">
|
|
<input asp-for="EditTask.EndTaskDate" type="text" id="EndTaskDate" class="form-control text-center date" placeholder="تاریخ">
|
|
</div>
|
|
|
|
<div class="row my-2">
|
|
<div class="col-4 pe-0">
|
|
<input type="radio" class="tm-rad" name="btnradio" id="today" autocomplete="off">
|
|
<label class="btn btn-outline-primary d-flex justify-content-center radio-btn" for="today" style="border-radius: 2px; margin: 0 2px">امروز</label>
|
|
</div>
|
|
<div class="col-4 p-0">
|
|
<input type="radio" class="tm-rad" name="btnradio" id="tommorow" autocomplete="off">
|
|
<label class="btn btn-outline-primary d-flex justify-content-center radio-btn" for="tommorow" style="border-radius: 2px; margin: 0 2px">فردا</label>
|
|
</div>
|
|
<div class="col-4 ps-0">
|
|
<input type="radio" class="tm-rad" name="btnradio" id="two-day-later" autocomplete="off">
|
|
<label class="btn btn-outline-primary d-flex justify-content-center radio-btn" for="two-day-later" style="border-radius: 2px; margin: 0 2px">پس فردا</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-4">
|
|
<div class="from-group">
|
|
<input asp-for="EditTask.EndTaskTime" id="EndTaskTime" type="text" class="form-control text-center" placeholder="00:00">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@* <div class="col-5 col-md-4">
|
|
<span class="sumDays">مهلت زمانی: </span>
|
|
</div> *@
|
|
</div>
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="from-group">
|
|
<textarea asp-for="EditTask.Description" id="Command_Description" class="tm-textarea p-2" rows="10" placeholder="توضیحات ...">
|
|
|
|
</textarea>
|
|
|
|
@* @{
|
|
// var Description = HttpUtility.HtmlDecode(Model.EditTask.Description);
|
|
var Description = @Html.Raw(Model.EditTask.Description);
|
|
} *@
|
|
|
|
@* @Html.TextAreaFor(x => Model.EditTask.Description, new { @class = "tm-textarea p-2", @id = "Command_Description" }) *@
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-12 col-lg-9">
|
|
<div class="row">
|
|
<div class="col-12 col-lg-11 col-xl-9">
|
|
|
|
<div class="d-block d-md-flex align-items-center">
|
|
<button class="upload-file" id="upload-doc" type="button">
|
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<path d="M5 5C5 3.89543 5.89543 3 7 3H11.75C11.8881 3 12 3.11193 12 3.25V8C12 9.10457 12.8954 10 14 10H18.75C18.8881 10 19 10.1119 19 10.25V19C19 20.1046 18.1046 21 17 21H7C5.89543 21 5 20.1046 5 19V5Z" fill="white" />
|
|
<path d="M13 8V3.60355C13 3.38083 13.2693 3.26929 13.4268 3.42678L18.5732 8.57322C18.7307 8.73071 18.6192 9 18.3964 9H14C13.4477 9 13 8.55228 13 8Z" fill="#29B4B4" />
|
|
<path d="M12 11.5V17.5" stroke="#29B4B4" stroke-linecap="round" />
|
|
<path d="M9 14.5H15" stroke="#29B4B4" stroke-linecap="round" />
|
|
</svg>
|
|
<span>بارگذاری تصاویر و مدارک</span>
|
|
</button>
|
|
|
|
<div class="d-flex justify-content-between align-items-center mx-1">
|
|
@foreach (var item in Model.EditTask.medias)
|
|
{
|
|
if (item.Category == "فایل")
|
|
{
|
|
var inBox = "inBox" + i;
|
|
<div class="upload-box empty @inBox">
|
|
<input type="text" class="d-none" id="EditTask_Document@(i)" name="EditTask_Document@(i)">
|
|
@if (item.Path.EndsWith(".jpg") || item.Path.EndsWith(".jpeg") || item.Path.EndsWith(".png") || item.Path.EndsWith(".gif") || item.Path.EndsWith(".webp"))
|
|
{
|
|
<img class="lightbox-enabled" src="@Url.Page("./Index", "ShowPicture", new { filePath = item.Path })" id="@Model.Id" />
|
|
}
|
|
else
|
|
{
|
|
<a href="@Url.Page("./Index", "GetFile", new { filePath = item.Path, id = Model.Id })">دانلود</a>
|
|
}
|
|
<div class="b1" style="cursor: pointer;" onclick="remove(@(i), @item.Id)">
|
|
<svg width="16" height="16" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="10" height="10" rx="5" fill="#FF4A4A" /><path d="M7 7L3 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round" /><path d="M3 7L7 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round" /></svg>
|
|
</div>
|
|
</div>
|
|
i++;
|
|
fileIndex++;
|
|
}
|
|
}
|
|
|
|
@for (int inn = fileIndex; inn < 6; inn++)
|
|
{
|
|
<div class="upload-box empty inBox@(inn + 1)">
|
|
<input type="file" class="d-none" id="EditTask_Document@(inn+1)" name="EditTask.Document@(inn+1)" accept=".pdf,.doc,.docx,.txt, image/*">
|
|
</div>
|
|
}
|
|
|
|
<div id="deletedItems" style="display: none">
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="col-12 col-lg-11 col-xl-9">
|
|
<div class="d-block d-md-flex align-items-center">
|
|
|
|
@if (Model.EditTask.medias.Any(x => x.Category == "صوت"))
|
|
{
|
|
var voice = Model.EditTask.medias.First(x => x.Category == "صوت");
|
|
<div id="OldVoice" class="d-block d-md-flex align-items-center w-100">
|
|
<button class="upload-file v1" type="button" onclick="removeVoice(@voice.Id)">
|
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<rect x="9" y="3" width="6" height="11" rx="3" fill="#29B4B4" stroke="white" stroke-width="1.2" stroke-linejoin="round" />
|
|
<path d="M5.4 11C5.4 12.7504 6.09536 14.4292 7.3331 15.6669C8.57084 16.9046 10.2496 17.6 12 17.6C13.7504 17.6 15.4292 16.9046 16.6669 15.6669C17.9046 14.4292 18.6 12.7504 18.6 11" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" />
|
|
<path d="M12 21V19" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" />
|
|
</svg>
|
|
<span style="font-size: 12px">حذف</span>
|
|
</button>
|
|
|
|
<div class="upload-box empty v1" id="upload-container-voice" style="width: 370px;">
|
|
<audio controls style="width: 100%; height: 30px">
|
|
<source src='@Url.Page("./Index", "ShowVoice", new { filePath = voice.Path })' type="audio/ogg">
|
|
Your browser does not support the audio element.
|
|
</audio>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="NewVoice" class="d-none align-items-center w-100">
|
|
<button class="upload-file record_btn v2" id="upload-voice" type="button">
|
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<rect x="9" y="3" width="6" height="11" rx="3" fill="#29B4B4" stroke="white" stroke-width="1.2" stroke-linejoin="round" />
|
|
<path d="M5.4 11C5.4 12.7504 6.09536 14.4292 7.3331 15.6669C8.57084 16.9046 10.2496 17.6 12 17.6C13.7504 17.6 15.4292 16.9046 16.6669 15.6669C17.9046 14.4292 18.6 12.7504 18.6 11" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" />
|
|
<path d="M12 21V19" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" />
|
|
</svg>
|
|
<span style="font-size: 12px">پیام صوتی</span>
|
|
</button>
|
|
|
|
<input type="file" class="d-none v2" asp-for="EditTask.Voice" id="EditTask_Voice">
|
|
<div class="d-flex justify-content-between align-items-center mx-1 v2" id="upload-container-voice">
|
|
<div class="upload-box-voice empty" id="msg_box"></div>
|
|
</div>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<button class="upload-file record_btn v2" id="upload-voice" type="button">
|
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<rect x="9" y="3" width="6" height="11" rx="3" fill="#29B4B4" stroke="white" stroke-width="1.2" stroke-linejoin="round" />
|
|
<path d="M5.4 11C5.4 12.7504 6.09536 14.4292 7.3331 15.6669C8.57084 16.9046 10.2496 17.6 12 17.6C13.7504 17.6 15.4292 16.9046 16.6669 15.6669C17.9046 14.4292 18.6 12.7504 18.6 11" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" />
|
|
<path d="M12 21V19" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" />
|
|
</svg>
|
|
<span style="font-size: 12px">پیام صوتی</span>
|
|
</button>
|
|
|
|
<input type="file" class="d-none v2" asp-for="EditTask.Voice">
|
|
<div class="d-flex justify-content-between align-items-center mx-1 v2" id="upload-container-voice">
|
|
<div class="upload-box-voice empty" id="msg_box"></div>
|
|
</div>
|
|
}
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row mt-3">
|
|
<div class="col-12 text-center">
|
|
<a asp-page="/Company/Task/Index" id="cancel" class="btn-tm-cancel m-1 text-white" type="button">
|
|
<span>انصراف</span>
|
|
</a>
|
|
<button type="button" id="save" class="btn-tm-save m-1">
|
|
<span>ویرایش</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="~/assetsclient/libs/jalaali-js/jalaali.js"></script>
|
|
<script src="~/admintheme/js/jquery.mask_1.14.16.min.js"></script>
|
|
|
|
<script>
|
|
var AntiForgeryToken = $('@Html.AntiForgeryToken()').val();
|
|
var EditSaveTask = '@Url.Page("/Company/Task/Index", "EditSaveTask")';
|
|
var SearchContractingParties = '@Url.Page("./Create", "SearchContractingParties")';
|
|
|
|
</script>
|
|
<script src="~/assetsadminnew/tasks/js/edit.js"></script>
|