@@ -15,13 +15,29 @@ const loadingPhotos = ref(false);
const lightbox = ref ( null ) ;
const fileInput = ref ( null ) ;
const uploadTarget = ref ( null ) ;
// Navigation variétés
const detailVarieties = ref ( [ ] ) ;
// Navigation variétés (groupe de Plant par nom_commun)
const detailPlantGroup = ref ( [ ] ) ;
const detailVarietyIdx = ref ( 0 ) ;
const detailPlant = computed ( ( ) => detailVarieties . value [ detailVarietyIdx . value ] ? ? null ) ;
const detailPlant = computed ( ( ) => detailPlantGroup . value [ detailVarietyIdx . value ] ? ? null ) ;
// detailPlantObj : ref sur la plante ouverte en détail (Plant complet)
const detailPlantObj = ref ( null ) ;
// detailVarieties : variétés (PlantVariety) de la plante affichée
const detailVarieties = computed ( ( ) => {
if ( ! detailPlantObj . value )
return [ ] ;
return detailPlantObj . value . varieties ? ? [ ] ;
} ) ;
// Associations au niveau nom_commun (première variété ayant des données)
const detailAssociations = computed ( ( ) => detailVarieties . value . find ( v => v . associations _favorables ? . length || v . associations _defavorables ? . length )
const detailAssociations = computed ( ( ) => detailPlantGroup . value . find ( v => v . associations _favorables ? . length || v . associations _defavorables ? . length )
? ? detailPlant . value ) ;
// Refs pour le formulaire variété
const showFormVariety = ref ( false ) ;
const editVariety = ref ( null ) ;
const formVariety = reactive ( {
variete : '' , tags : '' , notes _variete : '' ,
boutique _nom : '' , boutique _url : '' , prix _achat : undefined ,
date _achat : '' , poids : '' , dluo : '' ,
} ) ;
const categories = [
{ val : '' , label : 'TOUTES' } ,
{ val : 'potager' , label : '🥕 POTAGER' } ,
@@ -84,7 +100,7 @@ const filteredPlants = computed(() => {
const q = searchQuery . value . toLowerCase ( ) ;
result = result . filter ( p => {
const group = plantGroups . value . get ( ( p . nom _commun || '' ) . toLowerCase ( ) ) || [ ] ;
return group . some ( v => v . nom _commun ? . toLowerCase ( ) . includes ( q ) || v . variete ? . toLowerCase ( ) . includes ( q ) ) ;
return group . some ( v => v . nom _commun ? . toLowerCase ( ) . includes ( q ) || v . varieties ? . [ 0 ] ? . variete? . toLowerCase ( ) . includes ( q ) ) ;
} ) ;
}
return result . sort ( ( a , b ) => ( a . nom _commun || '' ) . localeCompare ( b . nom _commun || '' , 'fr' ) ) ;
@@ -144,26 +160,30 @@ function catTextClass(cat) {
} [ cat ] || 'text-text-muted' ;
}
function closeDetail ( ) {
detailVarieties . value = [ ] ;
detailPlantGroup . value = [ ] ;
detailPlantObj . value = null ;
detailVarietyIdx . value = 0 ;
plantPhotos . value = [ ] ;
}
async function openDetails ( p ) {
const key = ( p . nom _commun || '' ) . toLowerCase ( ) ;
const group = plantGroups . value . get ( key ) || [ p ] ;
detailVarieties . value = [ ... group ] . sort ( ( a , b ) => ( a . id || 0 ) - ( b . id || 0 ) ) ;
detailPlantGroup . value = [ ... group ] . sort ( ( a , b ) => ( a . id || 0 ) - ( b . id || 0 ) ) ;
detailVarietyIdx . value = 0 ;
await fetchPhotos ( detailVarieties . value [ 0 ] . id ) ;
detailPlantObj . value = detailPlantGroup . value [ 0 ] ;
await fetchPhotos ( detailPlantGroup . value [ 0 ] . id ) ;
}
async function prevVariety ( ) {
if ( detailVarietyIdx . value > 0 ) {
detailVarietyIdx . value -- ;
detailPlantObj . value = detailPlant . value ;
await fetchPhotos ( detailPlant . value . id ) ;
}
}
async function nextVariety ( ) {
if ( detailVarietyIdx . value < detailVarieties . value . length - 1 ) {
if ( detailVarietyIdx . value < detailPlantGroup . value . length - 1 ) {
detailVarietyIdx . value ++ ;
detailPlantObj . value = detailPlant . value ;
await fetchPhotos ( detailPlant . value . id ) ;
}
}
@@ -186,15 +206,16 @@ function startEdit(p) {
const withAssoc = group . find ( v => v . associations _favorables ? . length || v . associations _defavorables ? . length ) ? ? p ;
closeDetail ( ) ;
editPlant . value = p ;
const v0 = p . varieties ? . [ 0 ] ;
Object . assign ( form , {
nom _commun : p . nom _commun || '' , variete : p . variete || '' , famille : p . famille || '' ,
nom _commun : p . nom _commun || '' , variete : v0 ? . variete || '' , famille : p . famille || '' ,
categorie : p . categorie || 'potager' , besoin _eau : p . besoin _eau || 'moyen' , besoin _soleil : p . besoin _soleil || 'plein soleil' ,
plantation _mois : p . plantation _mois || '' , notes : p . notes || '' ,
associations _favorables : [ ... ( withAssoc . associations _favorables ? ? [ ] ) ] ,
associations _defavorables : [ ... ( withAssoc . associations _defavorables ? ? [ ] ) ] ,
boutique _nom : p . boutique _nom || '' , boutique _url : p . boutique _url || '' ,
prix _achat : p . prix _achat ? ? null , date _achat : p . date _achat || '' ,
poids : p . poids || '' , dluo : p . dluo || '' ,
boutique _nom : v0 ? . boutique _nom || '' , boutique _url : v0 ? . boutique _url || '' ,
prix _achat : v0 ? . prix _achat ? ? null , date _achat : v0 ? . date _achat || '' ,
poids : v0 ? . poids || '' , dluo : v0 ? . dluo || '' ,
} ) ;
assocFilter . value = '' ;
showAssocModal . value = false ;
@@ -211,15 +232,87 @@ function closeForm() {
date _achat : '' , poids : '' , dluo : '' ,
} ) ;
}
function openAddVariety ( ) {
if ( ! detailPlantObj . value )
return ;
editVariety . value = null ;
Object . assign ( formVariety , {
variete : '' , tags : '' , notes _variete : '' ,
boutique _nom : '' , boutique _url : '' , prix _achat : undefined ,
date _achat : '' , poids : '' , dluo : '' ,
} ) ;
showFormVariety . value = true ;
}
function openEditVariety ( v ) {
editVariety . value = v ;
Object . assign ( formVariety , { ... v } ) ;
showFormVariety . value = true ;
}
function closeFormVariety ( ) {
showFormVariety . value = false ;
editVariety . value = null ;
}
async function submitVariety ( ) {
if ( ! detailPlantObj . value ? . id )
return ;
const payload = { ... formVariety , prix _achat : formVariety . prix _achat ? ? undefined } ;
try {
if ( editVariety . value ? . id ) {
await plantsStore . updateVariety ( detailPlantObj . value . id , editVariety . value . id , payload ) ;
toast . success ( 'Variété modifiée' ) ;
}
else {
await plantsStore . createVariety ( detailPlantObj . value . id , payload ) ;
toast . success ( 'Variété ajoutée' ) ;
}
// Refresh plant data so detailPlantObj reflects updated varieties
await plantsStore . fetchAll ( ) ;
const updatedPlant = plantsStore . plants . find ( p => p . id === detailPlantObj . value ? . id ) ;
if ( updatedPlant )
detailPlantObj . value = updatedPlant ;
closeFormVariety ( ) ;
}
catch {
// L'intercepteur Axios affiche le message d'erreur
}
}
async function deleteVariety ( vid ) {
if ( ! detailPlantObj . value ? . id )
return ;
if ( ! confirm ( 'Supprimer cette variété ?' ) )
return ;
try {
await plantsStore . removeVariety ( detailPlantObj . value . id , vid ) ;
await plantsStore . fetchAll ( ) ;
const updatedPlant = plantsStore . plants . find ( p => p . id === detailPlantObj . value ? . id ) ;
if ( updatedPlant )
detailPlantObj . value = updatedPlant ;
toast . success ( 'Variété supprimée' ) ;
}
catch {
// L'intercepteur Axios affiche le message d'erreur
}
}
async function submitPlant ( ) {
if ( submitting . value )
return ;
submitting . value = true ;
try {
const payload = { ... form , prix _achat : form . prix _achat ? ? undefined } ;
// Extraire les champs variété du form (non envoyés dans Plant)
const varietyPayload = {
variete : form . variete || undefined ,
boutique _nom : form . boutique _nom || undefined ,
boutique _url : form . boutique _url || undefined ,
prix _achat : form . prix _achat ? ? undefined ,
date _achat : form . date _achat || undefined ,
poids : form . poids || undefined ,
dluo : form . dluo || undefined ,
} ;
// Payload Plant pur (sans champs variété)
const { variete : _v , boutique _nom : _bn , boutique _url : _bu , prix _achat : _pa , date _achat : _da , poids : _po , dluo : _d , ... plantPayload } = { ... form } ;
if ( editPlant . value ) {
await axios . put ( ` /api/plants/ ${ editPlant . value . id } ` , payload ) ;
// Synchroniser les associations à toutes les variété s du même nom commun
await axios . put ( ` /api/plants/ ${ editPlant . value . id } ` , plantP ayload ) ;
// Synchroniser associations aux plante s du même nom commun
const nomKey = form . nom _commun . toLowerCase ( ) ;
const siblings = plantsStore . plants . filter ( p => p . id !== editPlant . value . id && ( p . nom _commun || '' ) . toLowerCase ( ) === nomKey ) ;
for ( const sibling of siblings ) {
@@ -228,11 +321,27 @@ async function submitPlant() {
associations _defavorables : form . associations _defavorables ,
} ) ;
}
// Mettre à jour ou créer la variété
const existingVariety = editPlant . value . varieties ? . [ 0 ] ;
const hasVarietyData = Object . values ( varietyPayload ) . some ( v => v !== undefined ) ;
const plantId = editPlant . value . id ;
if ( existingVariety ? . id ) {
await plantsStore . updateVariety ( plantId , existingVariety . id , varietyPayload ) ;
}
else if ( hasVarietyData ) {
await plantsStore . createVariety ( plantId , varietyPayload ) ;
}
await plantsStore . fetchAll ( ) ;
toast . success ( 'Plante modifiée' ) ;
}
else {
await plantsStore . create ( payload ) ;
const created = await plantsStore . create ( plantP ayload ) ;
// Créer la variété si des données variété sont présentes
const hasVarietyData = Object . values ( varietyPayload ) . some ( v => v !== undefined ) ;
if ( created . id && hasVarietyData ) {
await plantsStore . createVariety ( created . id , varietyPayload ) ;
}
await plantsStore . fetchAll ( ) ;
toast . success ( 'Plante créée' ) ;
}
closeForm ( ) ;
@@ -470,7 +579,7 @@ if (__VLS_ctx.detailPlant) {
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( {
... { class : "flex items-center gap-3 mt-3" } ,
} ) ;
if ( _ _VLS _ctx . detailVarieties . length > 1 ) {
if ( _ _VLS _ctx . detailPlantGroup . length > 1 ) {
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( {
... { class : "flex items-center gap-2" } ,
} ) ;
@@ -484,19 +593,19 @@ if (__VLS_ctx.detailPlant) {
... { class : "text-text-muted text-xs font-bold" } ,
} ) ;
( _ _VLS _ctx . detailVarietyIdx + 1 ) ;
( _ _VLS _ctx . detailVarieties . length ) ;
( _ _VLS _ctx . detailPlantGroup . length ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . button , _ _VLS _intrinsicElements . button ) ( {
... { onClick : ( _ _VLS _ctx . nextVariety ) } ,
disabled : ( _ _VLS _ctx . detailVarietyIdx === _ _VLS _ctx . detailVarieties . length - 1 ) ,
disabled : ( _ _VLS _ctx . detailVarietyIdx === _ _VLS _ctx . detailPlantGroup . length - 1 ) ,
... { class : ( [ 'w-7 h-7 rounded-full border flex items-center justify-center text-sm font-bold transition-all' ,
_ _VLS _ctx . detailVarietyIdx === _ _VLS _ctx . detailVarieties . length - 1 ? 'border-bg-soft text-text-muted/30 cursor-not-allowed' : 'border-yellow/50 text-yellow hover:bg-yellow/10' ] ) } ,
_ _VLS _ctx . detailVarietyIdx === _ _VLS _ctx . detailPlantGroup . length - 1 ? 'border-bg-soft text-text-muted/30 cursor-not-allowed' : 'border-yellow/50 text-yellow hover:bg-yellow/10' ] ) } ,
} ) ;
}
if ( _ _VLS _ctx . detailPlant . variete ) {
if ( _ _VLS _ctx . detailPlant . varieties ? . [ 0 ] ? . variete) {
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . p , _ _VLS _intrinsicElements . p ) ( {
... { class : "text-yellow font-bold uppercase tracking-widest text-sm" } ,
} ) ;
( _ _VLS _ctx . detailPlant . variete ) ;
( _ _VLS _ctx . detailPlant . varieties ? . [ 0 ] ? . variete) ;
}
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . button , _ _VLS _intrinsicElements . button ) ( {
... { onClick : ( _ _VLS _ctx . closeDetail ) } ,
@@ -550,7 +659,31 @@ if (__VLS_ctx.detailPlant) {
... { class : "font-bold" } ,
} ) ;
( _ _VLS _ctx . detailPlant . plantation _mois ) ;
if ( _ _VLS _ctx . detailPlant. boutique _nom || _ _VLS _ctx . detailPlant . prix _achat || _ _VLS _ctx . detailPlant . poids || _ _VLS _ctx . detailPlant . dluo ) {
if ( _ _VLS _ctx . detailPlantObj ? . temp _germination ) {
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( {
... { class : "bg-bg/30 p-3 rounded-xl border border-bg-soft" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . span , _ _VLS _intrinsicElements . span ) ( {
... { class : "text-[9px] font-black text-text-muted uppercase block mb-0.5" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . span , _ _VLS _intrinsicElements . span ) ( {
... { class : "text-text text-sm" } ,
} ) ;
( _ _VLS _ctx . detailPlantObj . temp _germination ) ;
}
if ( _ _VLS _ctx . detailPlantObj ? . temps _levee _j ) {
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( {
... { class : "bg-bg/30 p-3 rounded-xl border border-bg-soft" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . span , _ _VLS _intrinsicElements . span ) ( {
... { class : "text-[9px] font-black text-text-muted uppercase block mb-0.5" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . span , _ _VLS _intrinsicElements . span ) ( {
... { class : "text-text text-sm" } ,
} ) ;
( _ _VLS _ctx . detailPlantObj . temps _levee _j ) ;
}
if ( _ _VLS _ctx . detailPlant . varieties ? . [ 0 ] ? . boutique _nom || _ _VLS _ctx . detailPlant . varieties ? . [ 0 ] ? . prix _achat || _ _VLS _ctx . detailPlant . varieties ? . [ 0 ] ? . poids || _ _VLS _ctx . detailPlant . varieties ? . [ 0 ] ? . dluo ) {
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( {
... { class : "space-y-2" } ,
} ) ;
@@ -560,7 +693,7 @@ if (__VLS_ctx.detailPlant) {
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( {
... { class : "grid grid-cols-2 sm:grid-cols-3 gap-3" } ,
} ) ;
if ( _ _VLS _ctx . detailPlant . boutique _nom ) {
if ( _ _VLS _ctx . detailPlant . varieties ? . [ 0 ] ? . boutique_nom ) {
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( {
... { class : "bg-bg/30 p-3 rounded-xl border border-bg-soft" } ,
} ) ;
@@ -570,9 +703,9 @@ if (__VLS_ctx.detailPlant) {
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . span , _ _VLS _intrinsicElements . span ) ( {
... { class : "text-text text-sm font-bold" } ,
} ) ;
( _ _VLS _ctx . detailPlant . boutique _nom ) ;
( _ _VLS _ctx . detailPlant . varieties ? . [ 0 ] ? . boutique_nom ) ;
}
if ( _ _VLS _ctx . detailPlant . prix _achat ) {
if ( _ _VLS _ctx . detailPlant . varieties ? . [ 0 ] ? . prix_achat ) {
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( {
... { class : "bg-bg/30 p-3 rounded-xl border border-bg-soft" } ,
} ) ;
@@ -582,9 +715,9 @@ if (__VLS_ctx.detailPlant) {
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . span , _ _VLS _intrinsicElements . span ) ( {
... { class : "text-yellow font-bold" } ,
} ) ;
( _ _VLS _ctx . detailPlant . prix _achat . toFixed ( 2 ) ) ;
( _ _VLS _ctx . detailPlant . varieties ? . [ 0 ] ? . prix_achat ? . toFixed ( 2 ) ) ;
}
if ( _ _VLS _ctx . detailPlant . date _achat ) {
if ( _ _VLS _ctx . detailPlant . varieties ? . [ 0 ] ? . date_achat ) {
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( {
... { class : "bg-bg/30 p-3 rounded-xl border border-bg-soft" } ,
} ) ;
@@ -594,9 +727,9 @@ if (__VLS_ctx.detailPlant) {
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . span , _ _VLS _intrinsicElements . span ) ( {
... { class : "text-text text-sm" } ,
} ) ;
( _ _VLS _ctx . detailPlant . date _achat ) ;
( _ _VLS _ctx . detailPlant . varieties ? . [ 0 ] ? . date_achat ) ;
}
if ( _ _VLS _ctx . detailPlant . poids ) {
if ( _ _VLS _ctx . detailPlant . varieties ? . [ 0 ] ? . poids) {
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( {
... { class : "bg-bg/30 p-3 rounded-xl border border-bg-soft" } ,
} ) ;
@@ -606,9 +739,9 @@ if (__VLS_ctx.detailPlant) {
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . span , _ _VLS _intrinsicElements . span ) ( {
... { class : "text-text text-sm font-bold" } ,
} ) ;
( _ _VLS _ctx . detailPlant . poids ) ;
( _ _VLS _ctx . detailPlant . varieties ? . [ 0 ] ? . poids) ;
}
if ( _ _VLS _ctx . detailPlant . dluo ) {
if ( _ _VLS _ctx . detailPlant . varieties ? . [ 0 ] ? . dluo) {
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( {
... { class : "bg-bg/30 p-3 rounded-xl border border-bg-soft" } ,
} ) ;
@@ -616,12 +749,12 @@ if (__VLS_ctx.detailPlant) {
... { class : "text-[9px] font-black text-text-muted uppercase block mb-0.5" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . span , _ _VLS _intrinsicElements . span ) ( {
... { class : ( [ 'text-sm font-bold' , _ _VLS _ctx . isDluoExpired ( _ _VLS _ctx . detailPlant . dluo ) ? 'text-red' : 'text-green' ] ) } ,
... { class : ( [ 'text-sm font-bold' , _ _VLS _ctx . isDluoExpired ( _ _VLS _ctx . detailPlant . varieties ? . [ 0 ] ? . dluo ? ? '' ) ? 'text-red' : 'text-green' ] ) } ,
} ) ;
( _ _VLS _ctx . detailPlant . dluo ) ;
( _ _VLS _ctx . isDluoExpired ( _ _VLS _ctx . detailPlant . dluo ) ? ' ⚠️' : '' ) ;
( _ _VLS _ctx . detailPlant . varieties ? . [ 0 ] ? . dluo) ;
( _ _VLS _ctx . isDluoExpired ( _ _VLS _ctx . detailPlant . varieties ? . [ 0 ] ? . dluo ? ? '' ) ? ' ⚠️' : '' ) ;
}
if ( _ _VLS _ctx . detailPlant . boutique _url ) {
if ( _ _VLS _ctx . detailPlant . varieties ? . [ 0 ] ? . boutique_url ) {
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( {
... { class : "bg-bg/30 p-3 rounded-xl border border-bg-soft" } ,
} ) ;
@@ -629,7 +762,7 @@ if (__VLS_ctx.detailPlant) {
... { class : "text-[9px] font-black text-text-muted uppercase block mb-0.5" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . a , _ _VLS _intrinsicElements . a ) ( {
href : ( _ _VLS _ctx . detailPlant . boutique _url ) ,
href : ( _ _VLS _ctx . detailPlant . varieties ? . [ 0 ] ? . boutique_url ) ,
target : "_blank" ,
rel : "noopener" ,
... { class : "text-blue text-xs hover:underline truncate block" } ,
@@ -691,6 +824,69 @@ if (__VLS_ctx.detailPlant) {
}
}
}
if ( _ _VLS _ctx . detailVarieties . length ) {
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( {
... { class : "space-y-2 mt-4" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . h3 , _ _VLS _intrinsicElements . h3 ) ( {
... { class : "text-[9px] font-black text-text-muted uppercase tracking-widest" } ,
} ) ;
( _ _VLS _ctx . detailVarieties . length ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( {
... { class : "space-y-1" } ,
} ) ;
for ( const [ v ] of _ _VLS _getVForSourceType ( ( _ _VLS _ctx . detailVarieties ) ) ) {
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( {
key : ( v . id ) ,
... { class : "flex items-center justify-between bg-bg/30 px-3 py-2 rounded-lg border border-bg-soft" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( { } ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . span , _ _VLS _intrinsicElements . span ) ( {
... { class : "text-text text-sm font-bold" } ,
} ) ;
( v . variete || '(sans nom)' ) ;
if ( v . boutique _nom ) {
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . span , _ _VLS _intrinsicElements . span ) ( {
... { class : "text-text-muted text-xs ml-2" } ,
} ) ;
( v . boutique _nom ) ;
}
if ( v . prix _achat ) {
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . span , _ _VLS _intrinsicElements . span ) ( {
... { class : "text-yellow text-xs ml-2" } ,
} ) ;
( v . prix _achat . toFixed ( 2 ) ) ;
}
if ( v . dluo && _ _VLS _ctx . isDluoExpired ( v . dluo ) ) {
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . span , _ _VLS _intrinsicElements . span ) ( {
... { class : "text-red text-xs ml-1" } ,
} ) ;
}
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( {
... { class : "flex gap-1" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . button , _ _VLS _intrinsicElements . button ) ( {
... { onClick : ( ... [ $event ] ) => {
if ( ! ( _ _VLS _ctx . detailPlant ) )
return ;
if ( ! ( _ _VLS _ctx . detailVarieties . length ) )
return ;
_ _VLS _ctx . openEditVariety ( v ) ;
} } ,
... { class : "text-text-muted hover:text-yellow text-xs px-2" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . button , _ _VLS _intrinsicElements . button ) ( {
... { onClick : ( ... [ $event ] ) => {
if ( ! ( _ _VLS _ctx . detailPlant ) )
return ;
if ( ! ( _ _VLS _ctx . detailVarieties . length ) )
return ;
_ _VLS _ctx . deleteVariety ( v . id ) ;
} } ,
... { class : "text-text-muted hover:text-red text-xs px-2" } ,
} ) ;
}
}
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( {
... { class : "space-y-3" } ,
} ) ;
@@ -766,6 +962,10 @@ if (__VLS_ctx.detailPlant) {
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( {
... { class : "p-4 bg-bg-hard border-t border-bg-soft flex gap-3" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . button , _ _VLS _intrinsicElements . button ) ( {
... { onClick : ( _ _VLS _ctx . openAddVariety ) } ,
... { class : "btn-primary !bg-green !text-bg py-2 px-4 font-black uppercase text-xs flex items-center gap-1" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . button , _ _VLS _intrinsicElements . button ) ( {
... { onClick : ( ... [ $event ] ) => {
if ( ! ( _ _VLS _ctx . detailPlant ) )
@@ -1249,6 +1449,152 @@ __VLS_asFunctionalElement(__VLS_intrinsicElements.input)({
... { class : "hidden" } ,
} ) ;
/** @type {typeof __VLS_ctx.fileInput} */ ;
if ( _ _VLS _ctx . showFormVariety ) {
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( {
... { onClick : ( _ _VLS _ctx . closeFormVariety ) } ,
... { class : "fixed inset-0 bg-black/80 backdrop-blur-sm z-[70] flex items-center justify-center p-4" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( {
... { class : "bg-bg-hard rounded-3xl p-6 w-full max-w-xl border border-bg-soft shadow-2xl max-h-[90vh] overflow-y-auto" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( {
... { class : "flex items-center justify-between mb-5 border-b border-bg-soft pb-4" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . h2 , _ _VLS _intrinsicElements . h2 ) ( {
... { class : "text-text font-black text-xl uppercase" } ,
} ) ;
( _ _VLS _ctx . editVariety ? 'Modifier la variété' : '➕ Nouvelle variété' ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . button , _ _VLS _intrinsicElements . button ) ( {
... { onClick : ( _ _VLS _ctx . closeFormVariety ) } ,
... { class : "text-text-muted hover:text-red text-2xl" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . p , _ _VLS _intrinsicElements . p ) ( {
... { class : "text-text-muted text-xs mb-4 italic" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . span , _ _VLS _intrinsicElements . span ) ( {
... { class : "text-yellow font-bold" } ,
} ) ;
( _ _VLS _ctx . detailPlantObj ? . nom _commun ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . form , _ _VLS _intrinsicElements . form ) ( {
... { onSubmit : ( _ _VLS _ctx . submitVariety ) } ,
... { class : "grid grid-cols-1 md:grid-cols-2 gap-4" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( {
... { class : "md:col-span-2" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . label , _ _VLS _intrinsicElements . label ) ( {
... { class : "text-text-muted text-[10px] font-black uppercase tracking-widest block mb-1" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . input ) ( {
required : true ,
... { class : "w-full bg-bg border border-bg-soft rounded-xl px-4 py-3 text-text text-sm focus:border-yellow outline-none" } ,
placeholder : "Ex: Nantaise, Cornue des Andes, Moneymaker…" ,
} ) ;
( _ _VLS _ctx . formVariety . variete ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( {
... { class : "md:col-span-2" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . label , _ _VLS _intrinsicElements . label ) ( {
... { class : "text-text-muted text-[10px] font-black uppercase tracking-widest block mb-1" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . input ) ( {
... { class : "w-full bg-bg border border-bg-soft rounded-xl px-4 py-3 text-text text-sm focus:border-yellow outline-none" } ,
placeholder : "bio, f1, ancien, résistant…" ,
} ) ;
( _ _VLS _ctx . formVariety . tags ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( { } ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . label , _ _VLS _intrinsicElements . label ) ( {
... { class : "text-text-muted text-[10px] font-black uppercase tracking-widest block mb-1" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . select , _ _VLS _intrinsicElements . select ) ( {
value : ( _ _VLS _ctx . formVariety . boutique _nom ) ,
... { class : "w-full bg-bg border border-bg-soft rounded-xl px-4 py-3 text-text text-sm outline-none focus:border-yellow appearance-none" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . option , _ _VLS _intrinsicElements . option ) ( {
value : "" ,
} ) ;
for ( const [ b ] of _ _VLS _getVForSourceType ( ( _ _VLS _ctx . BOUTIQUES ) ) ) {
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . option , _ _VLS _intrinsicElements . option ) ( {
key : ( b ) ,
value : ( b ) ,
} ) ;
( b ) ;
}
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( { } ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . label , _ _VLS _intrinsicElements . label ) ( {
... { class : "text-text-muted text-[10px] font-black uppercase tracking-widest block mb-1" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . input ) ( {
type : "number" ,
step : "0.01" ,
min : "0" ,
... { class : "w-full bg-bg border border-bg-soft rounded-xl px-4 py-3 text-text text-sm focus:border-yellow outline-none" } ,
} ) ;
( _ _VLS _ctx . formVariety . prix _achat ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( { } ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . label , _ _VLS _intrinsicElements . label ) ( {
... { class : "text-text-muted text-[10px] font-black uppercase tracking-widest block mb-1" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . input ) ( {
placeholder : "ex: 5g, 100 graines" ,
... { class : "w-full bg-bg border border-bg-soft rounded-xl px-4 py-3 text-text text-sm focus:border-yellow outline-none" } ,
} ) ;
( _ _VLS _ctx . formVariety . poids ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( { } ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . label , _ _VLS _intrinsicElements . label ) ( {
... { class : "text-text-muted text-[10px] font-black uppercase tracking-widest block mb-1" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . input ) ( {
type : "date" ,
... { class : "w-full bg-bg border border-bg-soft rounded-xl px-4 py-3 text-text text-sm focus:border-yellow outline-none" } ,
} ) ;
( _ _VLS _ctx . formVariety . date _achat ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( { } ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . label , _ _VLS _intrinsicElements . label ) ( {
... { class : "text-text-muted text-[10px] font-black uppercase tracking-widest block mb-1" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . input ) ( {
type : "date" ,
... { class : "w-full bg-bg border border-bg-soft rounded-xl px-4 py-3 text-text text-sm focus:border-yellow outline-none" } ,
} ) ;
( _ _VLS _ctx . formVariety . dluo ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( {
... { class : "md:col-span-2" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . label , _ _VLS _intrinsicElements . label ) ( {
... { class : "text-text-muted text-[10px] font-black uppercase tracking-widest block mb-1" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . input ) ( {
type : "url" ,
placeholder : "https://…" ,
... { class : "w-full bg-bg border border-bg-soft rounded-xl px-4 py-3 text-text text-sm focus:border-yellow outline-none" } ,
} ) ;
( _ _VLS _ctx . formVariety . boutique _url ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( {
... { class : "md:col-span-2" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . label , _ _VLS _intrinsicElements . label ) ( {
... { class : "text-text-muted text-[10px] font-black uppercase tracking-widest block mb-1" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . textarea ) ( {
value : ( _ _VLS _ctx . formVariety . notes _variete ) ,
rows : "3" ,
... { class : "w-full bg-bg border border-bg-soft rounded-xl px-4 py-3 text-text text-sm focus:border-yellow outline-none resize-none" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . div , _ _VLS _intrinsicElements . div ) ( {
... { class : "md:col-span-2 flex justify-between pt-4 border-t border-bg-soft" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . button , _ _VLS _intrinsicElements . button ) ( {
... { onClick : ( _ _VLS _ctx . closeFormVariety ) } ,
type : "button" ,
... { class : "text-text-muted hover:text-red uppercase text-xs font-bold px-6" } ,
} ) ;
_ _VLS _asFunctionalElement ( _ _VLS _intrinsicElements . button , _ _VLS _intrinsicElements . button ) ( {
type : "submit" ,
... { class : "btn-primary px-8 py-3 !bg-green !text-bg font-black" } ,
} ) ;
( _ _VLS _ctx . editVariety ? 'Sauvegarder' : 'Ajouter' ) ;
}
/** @type {__VLS_StyleScopedClasses['p-4']} */ ;
/** @type {__VLS_StyleScopedClasses['max-w-[1800px]']} */ ;
/** @type {__VLS_StyleScopedClasses['mx-auto']} */ ;
@@ -1503,6 +1849,32 @@ __VLS_asFunctionalElement(__VLS_intrinsicElements.input)({
/** @type {__VLS_StyleScopedClasses['gap-2']} */ ;
/** @type {__VLS_StyleScopedClasses['text-green']} */ ;
/** @type {__VLS_StyleScopedClasses['font-bold']} */ ;
/** @type {__VLS_StyleScopedClasses['bg-bg/30']} */ ;
/** @type {__VLS_StyleScopedClasses['p-3']} */ ;
/** @type {__VLS_StyleScopedClasses['rounded-xl']} */ ;
/** @type {__VLS_StyleScopedClasses['border']} */ ;
/** @type {__VLS_StyleScopedClasses['border-bg-soft']} */ ;
/** @type {__VLS_StyleScopedClasses['text-[9px]']} */ ;
/** @type {__VLS_StyleScopedClasses['font-black']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text-muted']} */ ;
/** @type {__VLS_StyleScopedClasses['uppercase']} */ ;
/** @type {__VLS_StyleScopedClasses['block']} */ ;
/** @type {__VLS_StyleScopedClasses['mb-0.5']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text']} */ ;
/** @type {__VLS_StyleScopedClasses['text-sm']} */ ;
/** @type {__VLS_StyleScopedClasses['bg-bg/30']} */ ;
/** @type {__VLS_StyleScopedClasses['p-3']} */ ;
/** @type {__VLS_StyleScopedClasses['rounded-xl']} */ ;
/** @type {__VLS_StyleScopedClasses['border']} */ ;
/** @type {__VLS_StyleScopedClasses['border-bg-soft']} */ ;
/** @type {__VLS_StyleScopedClasses['text-[9px]']} */ ;
/** @type {__VLS_StyleScopedClasses['font-black']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text-muted']} */ ;
/** @type {__VLS_StyleScopedClasses['uppercase']} */ ;
/** @type {__VLS_StyleScopedClasses['block']} */ ;
/** @type {__VLS_StyleScopedClasses['mb-0.5']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text']} */ ;
/** @type {__VLS_StyleScopedClasses['text-sm']} */ ;
/** @type {__VLS_StyleScopedClasses['space-y-2']} */ ;
/** @type {__VLS_StyleScopedClasses['text-[10px]']} */ ;
/** @type {__VLS_StyleScopedClasses['font-black']} */ ;
@@ -1653,6 +2025,45 @@ __VLS_asFunctionalElement(__VLS_intrinsicElements.input)({
/** @type {__VLS_StyleScopedClasses['py-0.5']} */ ;
/** @type {__VLS_StyleScopedClasses['rounded-full']} */ ;
/** @type {__VLS_StyleScopedClasses['capitalize']} */ ;
/** @type {__VLS_StyleScopedClasses['space-y-2']} */ ;
/** @type {__VLS_StyleScopedClasses['mt-4']} */ ;
/** @type {__VLS_StyleScopedClasses['text-[9px]']} */ ;
/** @type {__VLS_StyleScopedClasses['font-black']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text-muted']} */ ;
/** @type {__VLS_StyleScopedClasses['uppercase']} */ ;
/** @type {__VLS_StyleScopedClasses['tracking-widest']} */ ;
/** @type {__VLS_StyleScopedClasses['space-y-1']} */ ;
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
/** @type {__VLS_StyleScopedClasses['justify-between']} */ ;
/** @type {__VLS_StyleScopedClasses['bg-bg/30']} */ ;
/** @type {__VLS_StyleScopedClasses['px-3']} */ ;
/** @type {__VLS_StyleScopedClasses['py-2']} */ ;
/** @type {__VLS_StyleScopedClasses['rounded-lg']} */ ;
/** @type {__VLS_StyleScopedClasses['border']} */ ;
/** @type {__VLS_StyleScopedClasses['border-bg-soft']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text']} */ ;
/** @type {__VLS_StyleScopedClasses['text-sm']} */ ;
/** @type {__VLS_StyleScopedClasses['font-bold']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text-muted']} */ ;
/** @type {__VLS_StyleScopedClasses['text-xs']} */ ;
/** @type {__VLS_StyleScopedClasses['ml-2']} */ ;
/** @type {__VLS_StyleScopedClasses['text-yellow']} */ ;
/** @type {__VLS_StyleScopedClasses['text-xs']} */ ;
/** @type {__VLS_StyleScopedClasses['ml-2']} */ ;
/** @type {__VLS_StyleScopedClasses['text-red']} */ ;
/** @type {__VLS_StyleScopedClasses['text-xs']} */ ;
/** @type {__VLS_StyleScopedClasses['ml-1']} */ ;
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
/** @type {__VLS_StyleScopedClasses['gap-1']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text-muted']} */ ;
/** @type {__VLS_StyleScopedClasses['hover:text-yellow']} */ ;
/** @type {__VLS_StyleScopedClasses['text-xs']} */ ;
/** @type {__VLS_StyleScopedClasses['px-2']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text-muted']} */ ;
/** @type {__VLS_StyleScopedClasses['hover:text-red']} */ ;
/** @type {__VLS_StyleScopedClasses['text-xs']} */ ;
/** @type {__VLS_StyleScopedClasses['px-2']} */ ;
/** @type {__VLS_StyleScopedClasses['space-y-3']} */ ;
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
/** @type {__VLS_StyleScopedClasses['justify-between']} */ ;
@@ -1722,6 +2133,17 @@ __VLS_asFunctionalElement(__VLS_intrinsicElements.input)({
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
/** @type {__VLS_StyleScopedClasses['gap-3']} */ ;
/** @type {__VLS_StyleScopedClasses['btn-primary']} */ ;
/** @type {__VLS_StyleScopedClasses['!bg-green']} */ ;
/** @type {__VLS_StyleScopedClasses['!text-bg']} */ ;
/** @type {__VLS_StyleScopedClasses['py-2']} */ ;
/** @type {__VLS_StyleScopedClasses['px-4']} */ ;
/** @type {__VLS_StyleScopedClasses['font-black']} */ ;
/** @type {__VLS_StyleScopedClasses['uppercase']} */ ;
/** @type {__VLS_StyleScopedClasses['text-xs']} */ ;
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
/** @type {__VLS_StyleScopedClasses['gap-1']} */ ;
/** @type {__VLS_StyleScopedClasses['btn-primary']} */ ;
/** @type {__VLS_StyleScopedClasses['!bg-yellow']} */ ;
/** @type {__VLS_StyleScopedClasses['!text-bg']} */ ;
/** @type {__VLS_StyleScopedClasses['flex-1']} */ ;
@@ -2333,6 +2755,235 @@ __VLS_asFunctionalElement(__VLS_intrinsicElements.input)({
/** @type {__VLS_StyleScopedClasses['hover:opacity-90']} */ ;
/** @type {__VLS_StyleScopedClasses['transition-opacity']} */ ;
/** @type {__VLS_StyleScopedClasses['hidden']} */ ;
/** @type {__VLS_StyleScopedClasses['fixed']} */ ;
/** @type {__VLS_StyleScopedClasses['inset-0']} */ ;
/** @type {__VLS_StyleScopedClasses['bg-black/80']} */ ;
/** @type {__VLS_StyleScopedClasses['backdrop-blur-sm']} */ ;
/** @type {__VLS_StyleScopedClasses['z-[70]']} */ ;
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
/** @type {__VLS_StyleScopedClasses['justify-center']} */ ;
/** @type {__VLS_StyleScopedClasses['p-4']} */ ;
/** @type {__VLS_StyleScopedClasses['bg-bg-hard']} */ ;
/** @type {__VLS_StyleScopedClasses['rounded-3xl']} */ ;
/** @type {__VLS_StyleScopedClasses['p-6']} */ ;
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
/** @type {__VLS_StyleScopedClasses['max-w-xl']} */ ;
/** @type {__VLS_StyleScopedClasses['border']} */ ;
/** @type {__VLS_StyleScopedClasses['border-bg-soft']} */ ;
/** @type {__VLS_StyleScopedClasses['shadow-2xl']} */ ;
/** @type {__VLS_StyleScopedClasses['max-h-[90vh]']} */ ;
/** @type {__VLS_StyleScopedClasses['overflow-y-auto']} */ ;
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
/** @type {__VLS_StyleScopedClasses['justify-between']} */ ;
/** @type {__VLS_StyleScopedClasses['mb-5']} */ ;
/** @type {__VLS_StyleScopedClasses['border-b']} */ ;
/** @type {__VLS_StyleScopedClasses['border-bg-soft']} */ ;
/** @type {__VLS_StyleScopedClasses['pb-4']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text']} */ ;
/** @type {__VLS_StyleScopedClasses['font-black']} */ ;
/** @type {__VLS_StyleScopedClasses['text-xl']} */ ;
/** @type {__VLS_StyleScopedClasses['uppercase']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text-muted']} */ ;
/** @type {__VLS_StyleScopedClasses['hover:text-red']} */ ;
/** @type {__VLS_StyleScopedClasses['text-2xl']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text-muted']} */ ;
/** @type {__VLS_StyleScopedClasses['text-xs']} */ ;
/** @type {__VLS_StyleScopedClasses['mb-4']} */ ;
/** @type {__VLS_StyleScopedClasses['italic']} */ ;
/** @type {__VLS_StyleScopedClasses['text-yellow']} */ ;
/** @type {__VLS_StyleScopedClasses['font-bold']} */ ;
/** @type {__VLS_StyleScopedClasses['grid']} */ ;
/** @type {__VLS_StyleScopedClasses['grid-cols-1']} */ ;
/** @type {__VLS_StyleScopedClasses['md:grid-cols-2']} */ ;
/** @type {__VLS_StyleScopedClasses['gap-4']} */ ;
/** @type {__VLS_StyleScopedClasses['md:col-span-2']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text-muted']} */ ;
/** @type {__VLS_StyleScopedClasses['text-[10px]']} */ ;
/** @type {__VLS_StyleScopedClasses['font-black']} */ ;
/** @type {__VLS_StyleScopedClasses['uppercase']} */ ;
/** @type {__VLS_StyleScopedClasses['tracking-widest']} */ ;
/** @type {__VLS_StyleScopedClasses['block']} */ ;
/** @type {__VLS_StyleScopedClasses['mb-1']} */ ;
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
/** @type {__VLS_StyleScopedClasses['bg-bg']} */ ;
/** @type {__VLS_StyleScopedClasses['border']} */ ;
/** @type {__VLS_StyleScopedClasses['border-bg-soft']} */ ;
/** @type {__VLS_StyleScopedClasses['rounded-xl']} */ ;
/** @type {__VLS_StyleScopedClasses['px-4']} */ ;
/** @type {__VLS_StyleScopedClasses['py-3']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text']} */ ;
/** @type {__VLS_StyleScopedClasses['text-sm']} */ ;
/** @type {__VLS_StyleScopedClasses['focus:border-yellow']} */ ;
/** @type {__VLS_StyleScopedClasses['outline-none']} */ ;
/** @type {__VLS_StyleScopedClasses['md:col-span-2']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text-muted']} */ ;
/** @type {__VLS_StyleScopedClasses['text-[10px]']} */ ;
/** @type {__VLS_StyleScopedClasses['font-black']} */ ;
/** @type {__VLS_StyleScopedClasses['uppercase']} */ ;
/** @type {__VLS_StyleScopedClasses['tracking-widest']} */ ;
/** @type {__VLS_StyleScopedClasses['block']} */ ;
/** @type {__VLS_StyleScopedClasses['mb-1']} */ ;
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
/** @type {__VLS_StyleScopedClasses['bg-bg']} */ ;
/** @type {__VLS_StyleScopedClasses['border']} */ ;
/** @type {__VLS_StyleScopedClasses['border-bg-soft']} */ ;
/** @type {__VLS_StyleScopedClasses['rounded-xl']} */ ;
/** @type {__VLS_StyleScopedClasses['px-4']} */ ;
/** @type {__VLS_StyleScopedClasses['py-3']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text']} */ ;
/** @type {__VLS_StyleScopedClasses['text-sm']} */ ;
/** @type {__VLS_StyleScopedClasses['focus:border-yellow']} */ ;
/** @type {__VLS_StyleScopedClasses['outline-none']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text-muted']} */ ;
/** @type {__VLS_StyleScopedClasses['text-[10px]']} */ ;
/** @type {__VLS_StyleScopedClasses['font-black']} */ ;
/** @type {__VLS_StyleScopedClasses['uppercase']} */ ;
/** @type {__VLS_StyleScopedClasses['tracking-widest']} */ ;
/** @type {__VLS_StyleScopedClasses['block']} */ ;
/** @type {__VLS_StyleScopedClasses['mb-1']} */ ;
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
/** @type {__VLS_StyleScopedClasses['bg-bg']} */ ;
/** @type {__VLS_StyleScopedClasses['border']} */ ;
/** @type {__VLS_StyleScopedClasses['border-bg-soft']} */ ;
/** @type {__VLS_StyleScopedClasses['rounded-xl']} */ ;
/** @type {__VLS_StyleScopedClasses['px-4']} */ ;
/** @type {__VLS_StyleScopedClasses['py-3']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text']} */ ;
/** @type {__VLS_StyleScopedClasses['text-sm']} */ ;
/** @type {__VLS_StyleScopedClasses['outline-none']} */ ;
/** @type {__VLS_StyleScopedClasses['focus:border-yellow']} */ ;
/** @type {__VLS_StyleScopedClasses['appearance-none']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text-muted']} */ ;
/** @type {__VLS_StyleScopedClasses['text-[10px]']} */ ;
/** @type {__VLS_StyleScopedClasses['font-black']} */ ;
/** @type {__VLS_StyleScopedClasses['uppercase']} */ ;
/** @type {__VLS_StyleScopedClasses['tracking-widest']} */ ;
/** @type {__VLS_StyleScopedClasses['block']} */ ;
/** @type {__VLS_StyleScopedClasses['mb-1']} */ ;
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
/** @type {__VLS_StyleScopedClasses['bg-bg']} */ ;
/** @type {__VLS_StyleScopedClasses['border']} */ ;
/** @type {__VLS_StyleScopedClasses['border-bg-soft']} */ ;
/** @type {__VLS_StyleScopedClasses['rounded-xl']} */ ;
/** @type {__VLS_StyleScopedClasses['px-4']} */ ;
/** @type {__VLS_StyleScopedClasses['py-3']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text']} */ ;
/** @type {__VLS_StyleScopedClasses['text-sm']} */ ;
/** @type {__VLS_StyleScopedClasses['focus:border-yellow']} */ ;
/** @type {__VLS_StyleScopedClasses['outline-none']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text-muted']} */ ;
/** @type {__VLS_StyleScopedClasses['text-[10px]']} */ ;
/** @type {__VLS_StyleScopedClasses['font-black']} */ ;
/** @type {__VLS_StyleScopedClasses['uppercase']} */ ;
/** @type {__VLS_StyleScopedClasses['tracking-widest']} */ ;
/** @type {__VLS_StyleScopedClasses['block']} */ ;
/** @type {__VLS_StyleScopedClasses['mb-1']} */ ;
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
/** @type {__VLS_StyleScopedClasses['bg-bg']} */ ;
/** @type {__VLS_StyleScopedClasses['border']} */ ;
/** @type {__VLS_StyleScopedClasses['border-bg-soft']} */ ;
/** @type {__VLS_StyleScopedClasses['rounded-xl']} */ ;
/** @type {__VLS_StyleScopedClasses['px-4']} */ ;
/** @type {__VLS_StyleScopedClasses['py-3']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text']} */ ;
/** @type {__VLS_StyleScopedClasses['text-sm']} */ ;
/** @type {__VLS_StyleScopedClasses['focus:border-yellow']} */ ;
/** @type {__VLS_StyleScopedClasses['outline-none']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text-muted']} */ ;
/** @type {__VLS_StyleScopedClasses['text-[10px]']} */ ;
/** @type {__VLS_StyleScopedClasses['font-black']} */ ;
/** @type {__VLS_StyleScopedClasses['uppercase']} */ ;
/** @type {__VLS_StyleScopedClasses['tracking-widest']} */ ;
/** @type {__VLS_StyleScopedClasses['block']} */ ;
/** @type {__VLS_StyleScopedClasses['mb-1']} */ ;
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
/** @type {__VLS_StyleScopedClasses['bg-bg']} */ ;
/** @type {__VLS_StyleScopedClasses['border']} */ ;
/** @type {__VLS_StyleScopedClasses['border-bg-soft']} */ ;
/** @type {__VLS_StyleScopedClasses['rounded-xl']} */ ;
/** @type {__VLS_StyleScopedClasses['px-4']} */ ;
/** @type {__VLS_StyleScopedClasses['py-3']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text']} */ ;
/** @type {__VLS_StyleScopedClasses['text-sm']} */ ;
/** @type {__VLS_StyleScopedClasses['focus:border-yellow']} */ ;
/** @type {__VLS_StyleScopedClasses['outline-none']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text-muted']} */ ;
/** @type {__VLS_StyleScopedClasses['text-[10px]']} */ ;
/** @type {__VLS_StyleScopedClasses['font-black']} */ ;
/** @type {__VLS_StyleScopedClasses['uppercase']} */ ;
/** @type {__VLS_StyleScopedClasses['tracking-widest']} */ ;
/** @type {__VLS_StyleScopedClasses['block']} */ ;
/** @type {__VLS_StyleScopedClasses['mb-1']} */ ;
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
/** @type {__VLS_StyleScopedClasses['bg-bg']} */ ;
/** @type {__VLS_StyleScopedClasses['border']} */ ;
/** @type {__VLS_StyleScopedClasses['border-bg-soft']} */ ;
/** @type {__VLS_StyleScopedClasses['rounded-xl']} */ ;
/** @type {__VLS_StyleScopedClasses['px-4']} */ ;
/** @type {__VLS_StyleScopedClasses['py-3']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text']} */ ;
/** @type {__VLS_StyleScopedClasses['text-sm']} */ ;
/** @type {__VLS_StyleScopedClasses['focus:border-yellow']} */ ;
/** @type {__VLS_StyleScopedClasses['outline-none']} */ ;
/** @type {__VLS_StyleScopedClasses['md:col-span-2']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text-muted']} */ ;
/** @type {__VLS_StyleScopedClasses['text-[10px]']} */ ;
/** @type {__VLS_StyleScopedClasses['font-black']} */ ;
/** @type {__VLS_StyleScopedClasses['uppercase']} */ ;
/** @type {__VLS_StyleScopedClasses['tracking-widest']} */ ;
/** @type {__VLS_StyleScopedClasses['block']} */ ;
/** @type {__VLS_StyleScopedClasses['mb-1']} */ ;
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
/** @type {__VLS_StyleScopedClasses['bg-bg']} */ ;
/** @type {__VLS_StyleScopedClasses['border']} */ ;
/** @type {__VLS_StyleScopedClasses['border-bg-soft']} */ ;
/** @type {__VLS_StyleScopedClasses['rounded-xl']} */ ;
/** @type {__VLS_StyleScopedClasses['px-4']} */ ;
/** @type {__VLS_StyleScopedClasses['py-3']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text']} */ ;
/** @type {__VLS_StyleScopedClasses['text-sm']} */ ;
/** @type {__VLS_StyleScopedClasses['focus:border-yellow']} */ ;
/** @type {__VLS_StyleScopedClasses['outline-none']} */ ;
/** @type {__VLS_StyleScopedClasses['md:col-span-2']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text-muted']} */ ;
/** @type {__VLS_StyleScopedClasses['text-[10px]']} */ ;
/** @type {__VLS_StyleScopedClasses['font-black']} */ ;
/** @type {__VLS_StyleScopedClasses['uppercase']} */ ;
/** @type {__VLS_StyleScopedClasses['tracking-widest']} */ ;
/** @type {__VLS_StyleScopedClasses['block']} */ ;
/** @type {__VLS_StyleScopedClasses['mb-1']} */ ;
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
/** @type {__VLS_StyleScopedClasses['bg-bg']} */ ;
/** @type {__VLS_StyleScopedClasses['border']} */ ;
/** @type {__VLS_StyleScopedClasses['border-bg-soft']} */ ;
/** @type {__VLS_StyleScopedClasses['rounded-xl']} */ ;
/** @type {__VLS_StyleScopedClasses['px-4']} */ ;
/** @type {__VLS_StyleScopedClasses['py-3']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text']} */ ;
/** @type {__VLS_StyleScopedClasses['text-sm']} */ ;
/** @type {__VLS_StyleScopedClasses['focus:border-yellow']} */ ;
/** @type {__VLS_StyleScopedClasses['outline-none']} */ ;
/** @type {__VLS_StyleScopedClasses['resize-none']} */ ;
/** @type {__VLS_StyleScopedClasses['md:col-span-2']} */ ;
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
/** @type {__VLS_StyleScopedClasses['justify-between']} */ ;
/** @type {__VLS_StyleScopedClasses['pt-4']} */ ;
/** @type {__VLS_StyleScopedClasses['border-t']} */ ;
/** @type {__VLS_StyleScopedClasses['border-bg-soft']} */ ;
/** @type {__VLS_StyleScopedClasses['text-text-muted']} */ ;
/** @type {__VLS_StyleScopedClasses['hover:text-red']} */ ;
/** @type {__VLS_StyleScopedClasses['uppercase']} */ ;
/** @type {__VLS_StyleScopedClasses['text-xs']} */ ;
/** @type {__VLS_StyleScopedClasses['font-bold']} */ ;
/** @type {__VLS_StyleScopedClasses['px-6']} */ ;
/** @type {__VLS_StyleScopedClasses['btn-primary']} */ ;
/** @type {__VLS_StyleScopedClasses['px-8']} */ ;
/** @type {__VLS_StyleScopedClasses['py-3']} */ ;
/** @type {__VLS_StyleScopedClasses['!bg-green']} */ ;
/** @type {__VLS_StyleScopedClasses['!text-bg']} */ ;
/** @type {__VLS_StyleScopedClasses['font-black']} */ ;
var _ _VLS _dollars ;
const _ _VLS _self = ( await import ( 'vue' ) ) . defineComponent ( {
setup ( ) {
@@ -2346,10 +2997,15 @@ const __VLS_self = (await import('vue')).defineComponent({
loadingPhotos : loadingPhotos ,
lightbox : lightbox ,
fileInput : fileInput ,
detailVarieties : detailVarieties ,
detailPlantGroup : detailPlantGroup ,
detailVarietyIdx : detailVarietyIdx ,
detailPlant : detailPlant ,
detailPlantObj : detailPlantObj ,
detailVarieties : detailVarieties ,
detailAssociations : detailAssociations ,
showFormVariety : showFormVariety ,
editVariety : editVariety ,
formVariety : formVariety ,
categories : categories ,
BOUTIQUES : BOUTIQUES ,
form : form ,
@@ -2373,6 +3029,11 @@ const __VLS_self = (await import('vue')).defineComponent({
nextVariety : nextVariety ,
startEdit : startEdit ,
closeForm : closeForm ,
openAddVariety : openAddVariety ,
openEditVariety : openEditVariety ,
closeFormVariety : closeFormVariety ,
submitVariety : submitVariety ,
deleteVariety : deleteVariety ,
submitPlant : submitPlant ,
removePlant : removePlant ,
openUpload : openUpload ,