-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2c22d54
commit 9182892
Showing
4 changed files
with
76 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -168,19 +168,58 @@ | |
</div> | ||
|
||
<div style="height:15px"></div> | ||
|
||
<!-- ========== CHỌN KHUNG GIỜ ========== --> | ||
<input type="hidden" asp-for="TimeSlots" value="@Json.Serialize(Model.TimeSlots)" /> | ||
<div class="col-md-12"> | ||
<label for="timeInterval" class="sub-title">Chọn khoảng thời gian:</label> | ||
<select id="timeInterval" style="visibility:hidden"> | ||
<option value="" disabled selected> | ||
|
||
</option> | ||
<option value="30" selected>30 Minutes</option> | ||
<option value="60">1 Hour</option> | ||
</select> | ||
|
||
<div id="checkboxContainer"></div> @* List<int> TimeSlots đc lưu trong checkbox.name=TimeSlots *@ | ||
<label class="sub-title">Chọn khoảng thời gian:</label> | ||
<br/> | ||
<label class="sub-title">Sáng:</label> | ||
<div class="row"> | ||
@{ | ||
var sangSlots = ViewBag.AmTimeSlots; | ||
} | ||
@for (int i = 0; i < sangSlots.Count; i += 3) | ||
{ | ||
<div class="col-md-4"> | ||
@for (int j = i; j < i + 3 && j < sangSlots.Count; j++) | ||
{ | ||
|
||
var slot = sangSlots[j]; | ||
var isChecked = Model.TimeSlots != null && Model.TimeSlots.Contains(slot.ID); | ||
<div class="form-check"> | ||
<input class="form-check-input" type="checkbox" name="TimeSlots" value="@slot.ID" id="[email protected]" @(isChecked ? "checked" : "")> | ||
<label class="form-check-label" for="[email protected]"> | ||
@slot.StartTime.ToString("HH:mm") - @slot.EndTime.ToString("HH:mm") | ||
</label> | ||
</div> | ||
} | ||
</div> | ||
} | ||
</div> | ||
<label class="sub-title">Chiều:</label> | ||
<div class="row"> | ||
@{ | ||
var chieuSlots = ViewBag.PmTimeSlots; | ||
} | ||
@for (int i = 0; i < chieuSlots.Count; i += 3) | ||
{ | ||
<div class="col-md-4"> | ||
@for (int j = i; j < i + 3 && j < chieuSlots.Count; j++) | ||
{ | ||
|
||
var slot = chieuSlots[j]; | ||
var isChecked = Model.TimeSlots != null && Model.TimeSlots.Contains(slot.ID); | ||
<div class="form-check"> | ||
<input class="form-check-input" type="checkbox" name="TimeSlots" value="@slot.ID" id="[email protected]" @(isChecked ? "checked" : "")> | ||
<label class="form-check-label" for="[email protected]"> | ||
@slot.StartTime.ToString("HH:mm") - @slot.EndTime.ToString("HH:mm") | ||
</label> | ||
</div> | ||
} | ||
</div> | ||
} | ||
</div> | ||
</div> | ||
<div class="col-md-12 text-end"> | ||
<button type="submit" class="btn">Tạo mới</button> | ||
|
@@ -190,7 +229,7 @@ | |
<br /> | ||
|
||
@section Scripts { | ||
<script src="~/assets/js/timeinterval2.js"></script> | ||
@* <script src="~/assets/js/timeinterval2.js"></script> *@ | ||
<script src="~/assets/js/mobiscroll.javascript.min.js"></script> | ||
<!-- ========== MOBISCROLL SCHEDULE ========== --> | ||
<script src="~/assets/js/mobiscroll-calendar3.js"></script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters