Эх сурвалжийг харах

FDB Playground - delete rows feature

Vijayakrishnan 3 жил өмнө
parent
commit
6217b8479d

+ 14 - 2
resources/views/app/fdb-pg/fdb-rx.blade.php

@@ -18,10 +18,11 @@
                         <span class="font-size-14 font-weight-bold">Allergies</span>
                         <a href="#" v-on:click.prevent="addAllergy()" class="ml-3">+ Add</a>
                     </div>
-                    <table class="table table-sm table-striped table-bordered m-0" style="table-layout: fixed">
+                    <table class="table table-sm table-striped table-bordered m-0">
                         <thead>
                         <tr>
                             <th class="border-bottom-0 text-secondary">Allergy</th>
+                            <th class="border-bottom-0 width-100px"></th>
                         </tr>
                         </thead>
                         <tbody>
@@ -30,6 +31,9 @@
                                 <input type="text" class="rounded-0 border-0 form-control form-control-sm min-width-unset"
                                        fdb-allergy-suggest-search :fdb-suggest-group="index">
                             </td>
+                            <td class="text-center">
+                                <a href="#" v-on:click.prevent="allergies.splice(index, 1)"><i class="fa fa-trash-alt text-danger"></i></a>
+                            </td>
                         </tr>
                         </tbody>
                     </table>
@@ -39,10 +43,11 @@
                         <span class="font-size-14 font-weight-bold">Current Problems</span>
                         <a href="#" v-on:click.prevent="addDx()" class="ml-3">+ Add</a>
                     </div>
-                    <table class="table table-sm table-striped table-bordered m-0" style="table-layout: fixed">
+                    <table class="table table-sm table-striped table-bordered m-0">
                         <thead>
                         <tr>
                             <th class="border-bottom-0 text-secondary">Problem</th>
+                            <th class="border-bottom-0 width-100px"></th>
                         </tr>
                         </thead>
                         <tbody>
@@ -51,6 +56,9 @@
                                 <input type="text" class="rounded-0 border-0 form-control form-control-sm min-width-unset"
                                        fdb-dx-suggest-search :fdb-suggest-group="index">
                             </td>
+                            <td class="text-center">
+                                <a href="#" v-on:click.prevent="dx.splice(index, 1)"><i class="fa fa-trash-alt text-danger"></i></a>
+                            </td>
                         </tr>
                         </tbody>
                     </table>
@@ -73,6 +81,7 @@
                     <th class="border-bottom-0 text-secondary">Ger. Precautions</th>
                     <th class="border-bottom-0 text-secondary">Indications</th>
                     <th class="border-bottom-0 text-secondary">Contraindications</th>
+                    <th class="border-bottom-0 width-100px"></th>
                 </tr>
                 </thead>
                 <tbody>
@@ -112,6 +121,9 @@
                     <td class="p-0 overflow-auto contraindications" :fdb-suggest-group="index">
 
                     </td>
+                    <td class="text-center">
+                        <a href="#" v-on:click.prevent="rx.splice(index, 1)"><i class="fa fa-trash-alt text-danger"></i></a>
+                    </td>
                 </tr>
                 </tbody>
             </table>