mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-10 19:51:07 +03:30
update list item and labelcontroller
This commit is contained in:
@@ -94,10 +94,10 @@ class LabelController extends Controller
|
||||
if (auth('api')->user()->cant('delete', $Label)) {
|
||||
return \MessageResponse::error(trans('messages.access_denied'));
|
||||
}
|
||||
if(count($Label->packages))
|
||||
{
|
||||
$Label->packages()->detach();
|
||||
}
|
||||
// if(count($Label->packages))
|
||||
// {
|
||||
// $Label->packages()->detach();
|
||||
// }
|
||||
if(count($Label->cycles))
|
||||
{
|
||||
$Label->cycles()->detach();
|
||||
|
||||
@@ -74,6 +74,10 @@
|
||||
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
|
||||
<span>Remove</span>
|
||||
</v-btn>
|
||||
<v-btn color="orange darken-1" @click="generateBarcode(item.id)">
|
||||
<v-icon class="white--text mr-1 caption">fas fa-barcode</v-icon>
|
||||
<span>Generate Barcode</span>
|
||||
</v-btn>
|
||||
</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
@@ -155,6 +159,15 @@ export default {
|
||||
this.lastPage = result.data.data.last_page;
|
||||
}
|
||||
},
|
||||
async generateBarcode(code) {
|
||||
const result = await ApiService.post(urls.Barcode(code));
|
||||
if (result && result.status == 200) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-barcode-barcode",
|
||||
properties: { result }
|
||||
});
|
||||
}
|
||||
},
|
||||
async show(testResultId) {
|
||||
const result = await ApiService.get(
|
||||
urls.showItem(testResultId)
|
||||
|
||||
Reference in New Issue
Block a user