label with code and fix bug with search null country
Some checks are pending
deploy / deploy (push) Waiting to run

This commit is contained in:
2024-01-03 22:03:13 +01:00
parent 9d98ad7a10
commit 33219a4d88
2 changed files with 5 additions and 5 deletions

View File

@@ -31,8 +31,8 @@ class IkeaProducts extends Model
if ($country != '') $result = $result->where('country',$country); if ($country != '') $result = $result->where('country',$country);
return $result->get(); return $result->get();
} else if (strlen($item >= 5)) { } else if (strlen($item >= 5)) {
if ($country != '') $result = $this->where('country',$country); $result = $this->where(function ($query) use ($item) { $query->where('typeName', 'LIKE', '%' . $item . '%')->orWhere('name', 'LIKE', '%' . $item . '%'); } );
$result = $result->where(function ($query) use ($item) { $query->where('typeName', 'LIKE', '%' . $item . '%')->orWhere('name', 'LIKE', '%' . $item . '%'); } ); if ($country != '') $result = $result->where('country',$country);
return $result->get(); return $result->get();

View File

@@ -178,9 +178,9 @@ const async_search = async (item) => {
} }
function customLabel({ item, desc }) { function customLabel({ item, desc, code }) {
//console.log(item); //console.log(item);
return `${item} - ${desc}`; return `${item} - ${desc} - ${code}`;
} }
const headers = ref([ const headers = ref([
{ text: "Id", value: "id", sortable: true }, { text: "Id", value: "id", sortable: true },