mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 17:51:05 +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)) {
|
if (auth('api')->user()->cant('delete', $Label)) {
|
||||||
return \MessageResponse::error(trans('messages.access_denied'));
|
return \MessageResponse::error(trans('messages.access_denied'));
|
||||||
}
|
}
|
||||||
if(count($Label->packages))
|
// if(count($Label->packages))
|
||||||
{
|
// {
|
||||||
$Label->packages()->detach();
|
// $Label->packages()->detach();
|
||||||
}
|
// }
|
||||||
if(count($Label->cycles))
|
if(count($Label->cycles))
|
||||||
{
|
{
|
||||||
$Label->cycles()->detach();
|
$Label->cycles()->detach();
|
||||||
|
|||||||
@@ -74,6 +74,10 @@
|
|||||||
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
|
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
|
||||||
<span>Remove</span>
|
<span>Remove</span>
|
||||||
</v-btn>
|
</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>
|
</td>
|
||||||
</template>
|
</template>
|
||||||
</v-data-table>
|
</v-data-table>
|
||||||
@@ -155,6 +159,15 @@ export default {
|
|||||||
this.lastPage = result.data.data.last_page;
|
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) {
|
async show(testResultId) {
|
||||||
const result = await ApiService.get(
|
const result = await ApiService.get(
|
||||||
urls.showItem(testResultId)
|
urls.showItem(testResultId)
|
||||||
|
|||||||
Reference in New Issue
Block a user