feat: enhance AddAnnuncio options to include title in label and update query to select title in getAnnunciAvailableToAdd
This commit is contained in:
parent
43d67dceb8
commit
0904bba970
2 changed files with 2 additions and 2 deletions
|
|
@ -555,7 +555,7 @@ const AddAnnuncio = ({
|
|||
}}
|
||||
options={
|
||||
codici?.map((cod) => ({
|
||||
label: cod.codice,
|
||||
label: `${cod.codice} - ${cod.titolo_it}`,
|
||||
value: cod.id.toString(),
|
||||
})) || []
|
||||
}
|
||||
|
|
|
|||
|
|
@ -661,7 +661,7 @@ export const getAnnunciAvailableToAdd = async (
|
|||
const ids = servizioAnnunci.map((item) => item.annunci_id);
|
||||
let qry = tx
|
||||
.selectFrom("annunci")
|
||||
.select(["id", "codice"])
|
||||
.select(["id", "codice", "titolo_it"])
|
||||
.where("annunci.web", "=", true)
|
||||
.where("stato", "!=", "Sospeso");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue