Преглед на файлове

Allow only 1 equipment per ticket

Vijayakrishnan преди 4 години
родител
ревизия
a1c03a9cc2
променени са 2 файла, в които са добавени 15 реда и са изтрити 14 реда
  1. 9 8
      resources/views/app/patient/action-items-equipment-single.blade.php
  2. 6 6
      resources/views/app/patient/partials/equipment.blade.php

+ 9 - 8
resources/views/app/patient/action-items-equipment-single.blade.php

@@ -27,8 +27,8 @@
                                 <span class="font-weight-bold">@{{ item.created_at }}</span>
                             </div>
                             <div class="d-flex align-items-start flex-nowrap mb-2">
-                                <span class="width-100px text-secondary text-sm">Items</span>
-                                <span class="font-weight-bold" v-html="item.items && Array.isArray(item.items) ? item.items.join(', ') : '-'"></span>
+                                <span class="width-100px text-secondary text-sm">Equipment</span>
+                                <span class="font-weight-bold" v-html="item.items && Array.isArray(item.items) ? item.items[0] : '-'"></span>
                             </div>
                             <div class="d-flex align-items-start flex-nowrap mb-2">
                                 <span class="width-100px text-secondary text-sm">Purpose</span>
@@ -64,11 +64,12 @@
                     </h3>
                     <div class="mb-2">
                         <div class="d-flex align-items-center mb-1">
-                            <label class="text-sm text-secondary mb-0">Items</label>
-                            <span class="text-sm mx-2 text-secondary">|</span>
-                            <a href="#" class="text-sm" v-on:click.prevent="popupItem.items.push('')">Add</a>
+                            <label class="text-sm text-secondary mb-0">Equipment</label>
+                            {{--<span class="text-sm mx-2 text-secondary">|</span>
+                            <a href="#" class="text-sm" v-on:click.prevent="popupItem.items.push('')">Add</a>--}}
                         </div>
-                        <div class="d-flex align-items-center mb-2" v-for="(item, itemIndex) in popupItem.items">
+                        {{--<div class="d-flex align-items-center mb-2" v-for="(item, itemIndex) in popupItem.items">--}}
+                        <div class="d-flex align-items-center mb-2" v-for="(item, itemIndex) in popupItem.items" v-if="itemIndex === 0">
                             <div class="position-relative flex-grow-1">
                                 <input required type="text" data-option-list v-model="popupItem.items[itemIndex]" class="form-control form-control-sm">
                                 <div class="data-option-list">
@@ -77,9 +78,9 @@
                                     <div>Temperature Gun</div>
                                 </div>
                             </div>
-                            <a v-if="popupItem.items.length > 1" class="ml-2 text-danger" href="#" v-on:click.prevent="popupItem.items.splice(itemIndex, 1)">
+                            {{--<a v-if="popupItem.items.length > 1" class="ml-2 text-danger" href="#" v-on:click.prevent="popupItem.items.splice(itemIndex, 1)">
                                 <i class="fa fa-trash-alt"></i>
-                            </a>
+                            </a>--}}
                         </div>
                     </div>
                     <div class="mb-2">

+ 6 - 6
resources/views/app/patient/partials/equipment.blade.php

@@ -26,7 +26,7 @@
                     <div class="d-flex align-items-center flex-wrap">
                         <div>
                             <a :href="'/patients/view/{{$patient->uid}}/action-items-equipment/view/' + item.uid"
-                               v-html="item.items && Array.isArray(item.items) ? item.items.join(', ') : '-'"
+                               v-html="item.items && Array.isArray(item.items) ? item.items[0] : '-'"
                                class="font-weight-bold font-size-13"></a>
                         </div>
                         <span class="mx-2 text-secondary">•</span>
@@ -75,9 +75,9 @@
             </h3>
             <div class="mb-2">
                 <div class="d-flex align-items-center mb-1">
-                    <label class="text-sm text-secondary mb-0">Items</label>
-                    <span class="text-sm mx-2 text-secondary">|</span>
-                    <a href="#" class="text-sm" v-on:click.prevent="popupItem.items.push('')">Add</a>
+                    <label class="text-sm text-secondary mb-0">Equipment</label>
+                    {{--<span class="text-sm mx-2 text-secondary">|</span>
+                    <a href="#" class="text-sm" v-on:click.prevent="popupItem.items.push('')">Add</a>--}}
                 </div>
                 <div class="d-flex align-items-center mb-2" v-for="(item, itemIndex) in popupItem.items">
                     <div class="position-relative flex-grow-1">
@@ -88,9 +88,9 @@
                             <div>Temperature Gun</div>
                         </div>
                     </div>
-                    <a v-if="popupItem.items.length > 1" class="ml-2 text-danger" href="#" v-on:click.prevent="popupItem.items.splice(itemIndex, 1)">
+                    {{--<a v-if="popupItem.items.length > 1" class="ml-2 text-danger" href="#" v-on:click.prevent="popupItem.items.splice(itemIndex, 1)">
                         <i class="fa fa-trash-alt"></i>
-                    </a>
+                    </a>--}}
                 </div>
             </div>
             <div class="mb-2">