Bladeren bron

Fixed move to right/left

Samson Mutunga 3 jaren geleden
bovenliggende
commit
8129c8b2b3

+ 4 - 1
resources/views/app/practice-management/visit-templates/visit-template-segment-templates/segment-templates-list.blade.php

@@ -47,9 +47,12 @@
 							<div class="mr-2">
 								@include('app.practice-management.visit-templates.visit-template-segment-templates.update', ['position' => @$position])
 							</div>
-							<div>
+							<div class="mr-3">
 								@include('app.practice-management.visit-templates.visit-template-segment-templates.activate-deactivate')
 							</div>
+							<div>
+							@include('app.practice-management.visit-templates.visit-template-segment-templates.switch-position', ['position' => @$position])
+							</div>
 						</div>
 					</td>
 				</tr>

+ 25 - 0
resources/views/app/practice-management/visit-templates/visit-template-segment-templates/switch-position.blade.php

@@ -0,0 +1,25 @@
+<div moe>
+	<a start show href="#">
+		@if(@$position == 'LEFT')
+		<span class="text-secondary" title="Move to Right"><i class="fas fa-hand-point-right"></i></span>
+		@else
+		<span class="text-secondary" title="Move to Left"><i class="fas fa-hand-point-left"></i></span>
+		@endif
+	</a>
+	<form url="{{ @$position == 'LEFT' ? '/api/visitTemplateSegmentTemplate/moveToRight' : '/api/visitTemplateSegmentTemplate/moveToLeft' }}" class="mt-2" right>
+		<input type="hidden" name="uid" value="{{ $template->uid }}">
+		<div class="mb-2 w-100">
+			<label>Are you sure?</label>
+		</div>
+
+		<div class="mt-3">
+			@if(@$position == 'LEFT')
+				<button submit class="btn btn-sm btn-primary mr-2">Move to Right</button>
+			@else
+				<button submit class="btn btn-sm btn-primary mr-2">Move to Left</button>
+			@endif
+
+			<button cancel class="btn btn-default border">Cancel</button>
+		</div>
+	</form>
+</div>