Modal is getting the last value from my table - sql

I created a modal with bootstrap, in react, but when it opens, it takes the last value from my table(sql). Does anyone know why he does this, and how I fix it
this is my code with the table and modal
When I open my MODAL the information there is wrong, it is taking the last item in my table.
this classific is each field of my table
return (
<React.Fragment key={classific.ID}>
<tbody className="bg-white divide-y divide-gray-200">
<tr>
<td className="px-2 py-4 whitespace-nowrap">
<div className="flex items-center">
<div className="ml-4">
<div className="text-sm font-medium text-gray-900">
{classific.ID}
</div>
</div>
</div>
</td>
<td className="px-6 py-4 whitespace-nowrap">
<div className="font-bold text-sm text-gray-900">
{classific.DS_Classificacao}
</div>
</td>
<td className="px-9 py-4 whitespace-nowrap">
<div
className={
classific.Status === true
? 'inline-flex items-center px-2.5 py-0.5 rounded-md text-sm font-medium bg-green-100 text-green-800'
: 'inline-flex items-center px-2.5 py-0.5 rounded-md text-sm font-medium bg-red-100 text-red-800'
}
>
{classific.Status === true ? 'Ativo' : 'Inativo'}
</div>
</td>
<td className="content_td">
<button
onClick={e => EditForm(classific.ID, e)}
className="text-gray-400 hover:text-gray-100 mx-2"
>
<span className="sr-only">Close panel</span>
<PencilIcon
className="h-6 w-6"
aria-hidden="true"
onClick={handleShowE}
/>
</button>
<button className="text-gray-400 hover:text-gray-100 ml-2">
<span className="sr-only">Close panel</span>
<TrashIcon
className="h-6 w-6"
aria-hidden="true"
**Here is where I press for my modal to open**
onClick={handleShowD}
/>
</button>
</td>
</tr>
</tbody>
**The information inside the modal is wrong**
<Modal
show={showD}
onHide={handleCloseD}
backdrop="static"
keyboard={false}
>
<Modal.Header>
<Modal.Title>
Deletar <b>{classific.DS_Classificacao}</b>
</Modal.Title>
</Modal.Header>
<Modal.Body>
Tem certeza que deseja deletar
<b> {classific.DS_Classificacao}</b> ? Essa ação é
irreversivel.
</Modal.Body>
<Modal.Footer>
<button
type="button"
className="inline-flex items-center px-2.5 py-1.5 border border-gray-300 shadow-sm text-xs font-medium rounded text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
onClick={handleCloseD}
>
Cancelar
</button>
<button
type="button"
className="inline-flex items-center px-2.5 py-1.5 border border-gray-300 shadow-sm text-xs font-medium rounded text-red-700 bg-red hover:bg-red-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500"
onClick={e => deleteForm(classific.ID, e)}
>
Deletar
</button>
</Modal.Footer>
</Modal>
<Modal
show={showE}
onHide={handleCloseE}
backdrop="static"
keyboard={false}
>
<Modal.Header>
<Modal.Title>Editar Classificação</Modal.Title>
</Modal.Header>
<Modal.Body>
{/* <ModalEdit id={classific.ID}></ModalEdit> */}
</Modal.Body>
<Modal.Footer>
<button
type="button"
className="inline-flex items-center px-2.5 py-1.5 border border-transparent text-xs font-medium rounded shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
onClick={handleCloseE}
>
Cancelar
</button>
</Modal.Footer>
</Modal>
</React.Fragment>
)
})}```

Related

Tailwind css -> table height responsiv

I finally decided to seek help from people who will be more knowledgeable than me with this problem..
I have a table, very simple, and I would like this one to take up all the remaining space on the page, knowing that before it there is a list of inputs..
I tried several tricks, but after several hours I think you'll find the solution pretty quickly...^^
Main function :
export default function Interventions(){
return (
<div className="dark:bg-slate-800 px-4 sm:px-6 lg:px-8">
<InterventionSearchInput/>
<InterventionsTable/>
</div>
)
}
InterventionSearchInput :
export function InterventionSearchInput(props){
return(
<div className="text-center space-y-3 mt-4 mb-4">
<div className="space-x-2 flex justify-center" style={{flexFlow:'row wrap'}}>
<input
type="text"
name="id_intervention"
id="id_intervention"
placeholder="N° d'intervention"
className="max-w-[140px] mt-1 border border-gray-300 dark:border-gray-500 dark:bg-slate-700 dark:text-gray-300 dark:placeholder-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:border-indigo-500 sm:text-sm hover:bg-indigo-50 dark:hover:bg-slate-600"
/>
<input
type="text"
name="idInterne"
id="idInterne"
placeholder="Id Interne"
className="max-w-[140px] mt-1 border border-gray-300 dark:border-gray-500 dark:bg-slate-700 dark:text-gray-300 dark:placeholder-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:border-indigo-500 sm:text-sm hover:bg-indigo-50 dark:hover:bg-slate-600"
/>
<input
type="text"
name="IdTicket"
id="IdTicket"
placeholder="Id Ticket"
className="max-w-[140px] mt-1 border border-gray-300 dark:border-gray-500 dark:bg-slate-700 dark:text-gray-300 dark:placeholder-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:border-indigo-500 sm:text-sm hover:bg-indigo-50 dark:hover:bg-slate-600"
/>
<input
type="text"
name="site"
id="site"
placeholder="Site"
className="max-w-[140px] mt-1 border border-gray-300 dark:border-gray-500 dark:bg-slate-700 dark:text-gray-300 dark:placeholder-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:border-indigo-500 sm:text-sm hover:bg-indigo-50 dark:hover:bg-slate-600"
/>
<input
type="date"
name="dateStart"
id="dateStart"
className="mt-1 border border-gray-300 dark:border-gray-500 dark:bg-slate-700 dark:text-gray-300 dark:placeholder-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:border-indigo-500 sm:text-sm hover:bg-indigo-50 dark:hover:bg-slate-600"
/>
<input
type="date"
name="dateEnd"
id="dateEnd"
className="mt-1 border border-gray-300 dark:border-gray-500 dark:bg-slate-700 dark:text-gray-300 dark:placeholder-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:border-indigo-500 sm:text-sm hover:bg-indigo-50 dark:hover:bg-slate-600"
/>
<StatutListSearch setStatutSearch={props.setStatutSearch} statutSearch={props.statutSearch} setStatutSearchId={props.setStatutSearchId}/>
<button
onClick={() => csvInter()}
disabled={props.loaderCSV}
className="inline-block px-4 py-2 text-xs font-medium text-center text-yellow-500 uppercase transition bg-transparent border-2 border-yellow-500 rounded shadow ripple hover:shadow-lg hover:bg-yellow-100 focus:outline-none"
>
{props.loaderCSV && (
<svg role="status"
className="inline w-4 h-4 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-yellow-400"
viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
fill="currentColor"/>
<path
d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
fill="currentFill"/>
</svg>
)}
{props.loaderCSV && <span>CSV en cours de création</span>}
{!props.loaderCSV && <span>CSV</span>}
</button>
</div>
</div>
)
}
InterventionsTable :
export function InterventionsTable(props){
return(
loading ?
<LoaderTable type="spin" color="#00b0f0"/>
:
<div className="dark:bg-slate-800 flex flex-col">
<div className="-my-2 -mx-4 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div className="inline-block min-w-full py-2 align-middle md:px-6 lg:px-8">
<div onScroll={handleScroll}
className="shadow ring-1 ring-black ring-opacity-5 md:rounded-lg overflow-y-scroll Xsm:max-h-[50vh] sm:max-h-[60vh] md:max-h-[65vh] lg:max-h-[70vh] xl:max-h-[75vh] 2xl:max-h-[85vh] xxl:max-h-[89vh]">
<table className="min-w-full divide-y divide-gray-300 dark:divide-gray-500">
<thead className="bg-gray-50 sticky top-0">
<tr className="divide-x divide-gray-200 dark:divide-gray-500">
<th scope="col"
className="dark:bg-slate-700 dark:text-gray-300 py-3.5 pl-4 pr-4 text-left text-xs font-semibold text-gray-900">
<a href="#"
onClick={() => {
orderID === 'asc' ?
changeOrder('desc', 'tri_id_inter_listing')
:
changeOrder('asc', 'tri_id_inter_listing')
}}
className="group inline-flex">
Id Interne
<span
className="ml-2 flex-none rounded bg-gray-200 text-gray-900 group-hover:bg-gray-300">
{
orderID === 'asc' ?
<ChevronDownIcon className="h-5 w-5" aria-hidden="true"/>
:
<ChevronUpIcon className="h-5 w-5" aria-hidden="true"/>
}
</span>
</a>
</th>
<th scope="col"
className="dark:bg-slate-700 dark:text-gray-300 py-3.5 pl-4 pr-4 text-left text-xs font-semibold text-gray-900">
<a href="#"
onClick={() => {
orderIDInterne === 'asc' ?
changeOrder('desc', 'tri_id_client')
:
changeOrder('asc', 'tri_id_client')
}}
className="group inline-flex">
Id Client
<span
className="ml-2 flex-none rounded bg-gray-200 text-gray-900 group-hover:bg-gray-300">
{
orderIDInterne === 'asc' ?
<ChevronDownIcon className="h-5 w-5" aria-hidden="true"/>
:
<ChevronUpIcon className="h-5 w-5" aria-hidden="true"/>
}
</span>
</a>
</th>
<th scope="col"
className="dark:bg-slate-700 dark:text-gray-300 py-3.5 pl-4 pr-4 text-left text-xs font-semibold text-gray-900">
<a href="#"
onClick={() => {
orderDate === 'asc' ?
changeOrder('desc', 'tri_date_h_rdv')
:
changeOrder('asc', 'tri_date_h_rdv')
}}
className="group inline-flex">
Date RDV
<span
className="ml-2 flex-none rounded bg-gray-200 text-gray-900 group-hover:bg-gray-300">
{
orderDate === 'asc' ?
<ChevronDownIcon className="h-5 w-5" aria-hidden="true"/>
:
<ChevronUpIcon className="h-5 w-5" aria-hidden="true"/>
}
</span>
</a>
</th>
<th scope="col"
className="dark:bg-slate-700 dark:text-gray-300 py-3.5 pl-4 pr-4 text-left text-xs font-semibold text-gray-900">
<a href="#"
onClick={() => {
orderTech === 'asc' ?
changeOrder('desc', 'tri_technician')
:
changeOrder('asc', 'tri_technician')
}}
className="group inline-flex">
Partenaire
<span
className="ml-2 flex-none rounded bg-gray-200 text-gray-900 group-hover:bg-gray-300">
{
orderTech === 'asc' ?
<ChevronDownIcon className="h-5 w-5" aria-hidden="true"/>
:
<ChevronUpIcon className="h-5 w-5" aria-hidden="true"/>
}
</span>
</a>
</th>
<th scope="col"
className="dark:bg-slate-700 dark:text-gray-300 py-3.5 pl-4 pr-4 text-left text-xs font-semibold text-gray-900">
<a href="#"
onClick={() => {
orderSite === 'asc' ?
changeOrder('desc', 'tri_site')
:
changeOrder('asc', 'tri_site')
}}
className="group inline-flex">
Site
<span
className="ml-2 flex-none rounded bg-gray-200 text-gray-900 group-hover:bg-gray-300">
{
orderSite === 'asc' ?
<ChevronDownIcon className="h-5 w-5" aria-hidden="true"/>
:
<ChevronUpIcon className="h-5 w-5" aria-hidden="true"/>
}
</span>
</a>
</th>
<th scope="col"
className="dark:bg-slate-700 dark:text-gray-300 py-3.5 pl-4 pr-4 text-left text-xs font-semibold text-gray-900">
<a href="#"
onClick={() => {
orderAdresse === 'asc' ?
changeOrder('desc', 'tri_adresse')
:
changeOrder('asc', 'tri_adresse')
}}
className="group inline-flex">
Adresse
<span
className="ml-2 flex-none rounded bg-gray-200 text-gray-900 group-hover:bg-gray-300">
{
orderAdresse === 'asc' ?
<ChevronDownIcon className="h-5 w-5" aria-hidden="true"/>
:
<ChevronUpIcon className="h-5 w-5" aria-hidden="true"/>
}
</span>
</a>
</th>
<th scope="col"
className="dark:bg-slate-700 dark:text-gray-300 py-3.5 pl-4 pr-4 text-left text-xs font-semibold text-gray-900">
<a href="#"
onClick={() => {
orderVille === 'asc' ?
changeOrder('desc', 'tri_ville')
:
changeOrder('asc', 'tri_ville')
}}
className="group inline-flex">
Ville
<span
className="ml-2 flex-none rounded bg-gray-200 text-gray-900 group-hover:bg-gray-300">
{
orderVille === 'asc' ?
<ChevronDownIcon className="h-5 w-5" aria-hidden="true"/>
:
<ChevronUpIcon className="h-5 w-5" aria-hidden="true"/>
}
</span>
</a>
</th>
<th scope="col"
className="dark:bg-slate-700 dark:text-gray-300 py-3.5 pl-4 pr-4 text-left text-xs font-semibold text-gray-900">
<a href="#"
onClick={() => {
orderCP === 'asc' ?
changeOrder('desc', 'tri_cp')
:
changeOrder('asc', 'tri_cp')
}}
className="group inline-flex">
CP
<span
className="ml-2 flex-none rounded bg-gray-200 text-gray-900 group-hover:bg-gray-300">
{
orderCP === 'asc' ?
<ChevronDownIcon className="h-5 w-5" aria-hidden="true"/>
:
<ChevronUpIcon className="h-5 w-5" aria-hidden="true"/>
}
</span>
</a>
</th>
<th scope="col"
className="dark:bg-slate-700 dark:text-gray-300 py-3.5 pl-4 pr-4 text-left text-xs font-semibold text-gray-900">
<a href="#"
className="group inline-flex">
Dossier de clôture
</a>
</th>
<th scope="col"
className="dark:bg-slate-700 dark:text-gray-300 py-3.5 pl-4 pr-4 text-left text-xs font-semibold text-gray-900">
<a href="#"
onClick={() => {
orderStatut === 'asc' ?
changeOrder('desc', 'tri_statut')
:
changeOrder('asc', 'tri_statut')
}}
className="group inline-flex">
Statut
<span
className="ml-2 flex-none rounded bg-gray-200 text-gray-900 group-hover:bg-gray-300">
{
orderStatut === 'asc' ?
<ChevronDownIcon className="h-5 w-5" aria-hidden="true"/>
:
<ChevronUpIcon className="h-5 w-5" aria-hidden="true"/>
}
</span>
</a>
</th>
</tr>
</thead>
<tbody
className="divide-y divide-gray-200 bg-white h-48 max-h-screen overflow-y-scroll dark:bg-slate-700 dark:divide-gray-500">
{
items.map((c, index) => (
<tr onClick={(e) => {
e.preventDefault()
e.stopPropagation()
props.setShowMTicket(!props.showMTicket)
props.setIdInter(c.id)
}}
key={index}
className="divide-x divide-gray-200 dark:divide-gray-500 hover:bg-sky-100 dark:hover:bg-slate-600">
<td className="whitespace-wrap py-4 pl-4 pr-4 text-xs font-medium text-gray-900 cursor-pointer dark:text-gray-300">{c.id}</td>
<td className="whitespace-wrap py-4 pl-4 pr-4 text-xs text-gray-500 max-w-xs cursor-pointer dark:text-gray-300">{c.num_inter_apporteur}</td>
<td className="whitespace-wrap py-4 pl-4 pr-4 text-xs text-gray-500 cursor-pointer dark:text-gray-300">{c.planning_date_begin}</td>
<td className="whitespace-wrap py-4 pl-4 pr-4 text-xs font-medium text-gray-500 cursor-pointer dark:text-gray-300">{c.prenomTECH} {c.nomTECH}</td>
<td className="whitespace-wrap py-4 pl-4 pr-4 text-xs text-gray-500 cursor-pointer dark:text-gray-300">{c.site}</td>
<td className="whitespace-wrap py-4 pl-4 pr-4 text-xs text-gray-500 cursor-pointer dark:text-gray-300">{c.adresse}</td>
<td className="whitespace-wrap py-4 pl-4 pr-4 text-xs text-gray-500 cursor-pointer dark:text-gray-300">{c.ville}</td>
<td className="whitespace-wrap py-4 pl-4 pr-4 text-xs text-gray-500 cursor-pointer dark:text-gray-300">{c.cp_site}</td>
<td className="whitespace-wrap py-4 pl-4 pr-4 text-xs text-gray-500 cursor-pointer">
{
props.isLoadingDL ?
<Loader type="spin" color="orange"/>
:
<>
<svg xmlns="http://www.w3.org/2000/svg"
className="h-6 w-6 m-auto" fill="none"
viewBox="0 0 24 24" stroke="orange"
stroke-width="2" data-tip data-for='duplicata'
onClick={(e) => {
e.preventDefault()
e.stopPropagation()
props.setIsLoadingDL(true)
props.dlFolderCloture(c.id, c.login_intervention);
}}>
<path stroke-linecap="round" stroke-linejoin="round"
d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"/>
</svg>
<ReactTooltip id='duplicata' type='light'
effect='solid'>
<span>Télécharger le dossier de clôture</span>
</ReactTooltip>
</>
}
</td>
<td className="whitespace-wrap py-4 pl-4 pr-4 text-xs text-gray-500 cursor-pointer dark:text-gray-300 text-center">
<span className={
c.statut === "11" || c.statut === "4" ?
"inline-block py-1 px-2 dark:text-gray-300 border-2 border-green-500 rounded-full"
:
c.statut === "5" ?
"inline-block py-1 px-2 dark:text-gray-300 border-2 border-violet-500 rounded-full"
:
c.statut === "1" ?
"inline-block py-1 px-2 dark:text-gray-300 border-2 border-orange-500 rounded-full"
:
"inline-block py-1 px-2 dark:text-gray-300 border-2 border-red-500 rounded-full"
}>{c.libelle_statut}</span>
</td>
</tr>
))
}
</tbody>
</table>
</div>
<div
className="hidden md:flex md:w-48 md:flex-col md:fixed fixed bottom-0 left-0 min-w-12rem">
<div className="max-w-7xl">
<div className="p-2 bg-blue-600 shadow-lg sm:p-3">
<div className="flex items-center justify-center flex-wrap">
<div
className="order-3 mt-2 flex-shrink-0 w-full sm:order-2 sm:mt-0 sm:w-auto font-medium text-white">
<p>Interventions : {props.nbInter}</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
)
}
I removed all props and functions, only the css is important for the problem..
So to summarize, how to make the table take all the remaining height and keep the ratio when the page resizes, because currently when I resize, the "end" of the table is no longer visible..
I don't know if I was clear enough.
Image :
[Table without resize][1]
[Table after resize][2]
[1]: https://i.stack.imgur.com/Yjh3E.png
[2]: https://i.stack.imgur.com/A5DTl.png

Flowbite plugin not working in RouterView

I am currently building a dashboard app and I am facing an issue I can´t solve.
App.vue
<template>
<div class="flex flex-row min-h-screen w-screen">
<SideBar />
<div class="flex flex-col w-full bg-gray-300 shrink min-w-0">
<TopBar />
<RouterView />
</div>
</div>
</template>
Dropdown fragment in TopBar component (flowbite acts normal):
<button
type="button"
class="flex mr-3 text-sm md:mr-0 items-center"
id="user-menu-button"
aria-expanded="false"
data-dropdown-toggle="user-menu"
>
<span class="sr-only">Open user menu</span>
<img
class="w-8 h-8 rounded-full border-green"
src="https://picsum.photos/200"
alt="user photo"
/>
<span class="ml-3 text-medium text-gray-500"
>Hallo, <span class="font-semibold">Leon!</span></span
>
</button>
<!-- Dropdown menu -->
<div
class="
hidden
z-50
my-4
text-base
list-none
bg-white
rounded
divide-y divide-gray-100
shadow
dark:bg-gray-700 dark:divide-gray-600
"
id="user-menu"
style="
position: absolute;
inset: auto auto 0px 0px;
margin: 0px;
transform: translate(1246px, 723px);
"
data-popper-reference-hidden=""
data-popper-escaped=""
data-popper-placement="top"
>
Start of at the RouterView injected Component:
<template>
<main class="w-full h-full py-5 px-5">
<CardStatus />
<Card class="max-w-3xl max-h-80 p-5">
<div class="mb-4 flex flex-row justify-between">
<h5
class="
text-xl
font-semibold
tracking-tight
text-gray-900
dark:text-white
"
>
Dropdown fragment in CardStatus component (flowbite not working):
<button
id="dropdownDefault"
data-dropdown-toggle="dropdown"
class="
text-white
bg-blue-700
hover:bg-blue-800
focus:ring-4 focus:outline-none focus:ring-blue-300
font-medium
rounded-lg
text-sm
px-4
py-2.5
text-center
inline-flex
items-center
dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800
"
type="button"
>
Dropdown button
<svg
class="w-4 h-4 ml-2"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M19 9l-7 7-7-7"
></path>
</svg>
</button>
<!-- Dropdown menu -->
<div
id="dropdown"
class="
z-10
hidden
bg-white
divide-y divide-gray-100
rounded
shadow
w-44
dark:bg-gray-700
"
>
<ul
class="py-1 text-sm text-gray-700 dark:text-gray-200"
aria-labelledby="dropdownDefault"
>
I have no idea why it acts like this. I imported and installed everything like explained in the documentation.
Thanks

How to position the dropdown to top of the grid elements

I tried to position the dropdown to the top of the page using Tailwind CSS and z-index.
But it goes behind of other elements in the grid
image
Code Snipets
<div class="flex flex-col gap-y-4">
<h1 class="text-3xl font-semibold text-left font-display sm:text-4xl">
Following
</h1>
<div class="flex flex-col w-full h-full gap-4 p-4 bg-white border border-gray-200 rounded shadow-md">
<h1 class="mb-3 text-xl font-semibold text-left font-display">
Legislators
</h1>
<div class="flex flex-col items-between">
<div class="relative z-10 grid gap-4 mb-5 xxs:grid-cols-1 xs:grid-cols-1 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-3">
<FollowingCard
v-for="govId in legislatorsFollowed"
:key="govId"
class="w-full sm:w-auto"
:legor-id="govId"
/>
</div>
</div>
</div>
FollowingCard.vue
person
{{ name }}
{{ role }} | {{ party }} | {{ state }} of {{ country }} {{showDropdown}}
more_vert
<div v-if="showDropdown" class="absolute top-0 left-0 z-40 flex flex-col py-1 mt-8 overflow-y-auto bg-white border border-gray-200 rounded-md shadow-sm max-h-40" data-testid="sessionDropdownBtn">
<button
v-for="session in topics"
:key="session"
class="relative z-50 flex items-center justify-start w-full px-4 py-2 text-sm text-left capitalize hover:bg-gray-100 font-body min-w-max"
>
{{ session }}
</button>
</div>
</button>
</div>
</transition>
</div>

Click Prevent on button until form is valid

I have a multi-step form. This is the first step in the form. Using Vee-Validate, I am trying to figure out how I would prevent the next button from being clickable before the form is valid. This is Fee-Validate 4 Vue 3
FORM:
<Form action="#" #submit="submit" method="POST" class="overflow-hidden space-y-6 pt-3">
<div v-if="formStep == 1">
<div>
<div class="relative border border-gray-500 rounded-md px-3 py-2 shadow-sm focus-within:ring-1 focus-within:ring-blue-600 focus-within:border-blue-600 ">
<label for="name" value="Name" class="absolute -top-2 left-2 -mt-px inline-block px-1 bg-gray-900 text-sm font-medium text-gray-50">Username</label>
<Field
#keydown.space.prevent
type="text"
autocomplete="username"
name="name"
id="name"
v-model="form.name"
:rules="validateUsername"
required
autofocus
class="bg-gray-900 text-white block w-full border-0 p-0 placeholder-gray-500 focus:ring-0 sm:text-sm"
placeholder=""
/>
</div>
<ErrorMessage name="name" class="text-red-500 mt-2" />
</div>
<div class="mt-6">
<div class="relative border border-gray-500 rounded-md px-3 py-2 shadow-sm focus-within:ring-1 focus-within:ring-blue-600 focus-within:border-blue-600">
<label for="email" value="Email" class="absolute -top-2 left-2 -mt-px inline-block px-1 bg-gray-900 text-sm font-medium text-gray-50">Email Address</label>
<Field
id="email"
name="email"
type="email"
autocomplete="email"
v-model="form.email"
:rules="validateEmail"
required
autofocus
class="bg-gray-900 text-white block w-full border-0 p-0 placeholder-gray-500 focus:ring-0 sm:text-sm"
placeholder=""
/>
</div>
<ErrorMessage name="email" class="text-red-500 mt-2" />
</div>
<div class="mt-6">
<div class="relative border border-gray-500 rounded-md px-3 py-2 shadow-sm focus-within:ring-1 focus-within:ring-blue-600 focus-within:border-blue-600">
<label for="password" value="Password" class="absolute -top-2 left-2 -mt-px inline-block px-1 bg-gray-900 text-sm font-medium text-gray-50">Password</label>
<Field
id="password"
name="password"
type="password"
v-model="form.password"
required
autocomplete="new-password"
:rules="validatePassword"
validateOnInput
class="bg-gray-900 text-white block w-full border-0 p-0 placeholder-gray-500 focus:ring-0 sm:text-sm"
placeholder=""
/>
</div>
<ErrorMessage name="password" class="text-red-500 mt-2" />
</div>
<div class="mt-6">
<div class="relative border border-gray-500 rounded-md px-3 py-2 shadow-sm focus-within:ring-1 focus-within:ring-blue-600 focus-within:border-blue-600">
<label for="password_confirmation" value="Confirm Password" class="absolute -top-2 left-2 -mt-px inline-block px-1 bg-gray-900 text-sm font-medium text-gray-50">Confirm Password</label>
<Field
id="password_confirmation"
name="password_confirmation"
type="password"
v-model="form.password_confirmation"
required
autocomplete="new-password"
class="bg-gray-900 text-white block w-full border-0 p-0 placeholder-gray-500 focus:ring-0 sm:text-sm"
placeholder=""
/>
</div>
<div v-if="form.password != form.password_confirmation">
<p class="text-sm text-red-500 mt-2">Passwords do not match</p>
</div>
</div>
</div>
<div>
<div v-if="formStep == 1">
<button type="button" #click="[nextStep(), locatorButtonPressed(), getStreetAddressFrom(this.form.user_latitude, this.form.user_longitude)] " class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-red-600 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500">Next</button>
</div>
</Form>
Where I am not sure is do I create a new method for this, or does vee-validate have some function I am not understanding within their documentation. Is there a reason to use Yup to make this work or am I just off the ball on this one altogether?
Also, Is there a way to make the button gray until the form is valid. I am using Tailwind 3

CSS suggestions don't show up

I am currently working in PhpStorm and closed the project yesterday evening as usual, as well as started it as usual today.
But now when I type CSS code I don't get any recommendations / auto completion suggestions.
The only difference is that I have a new keyboard today, everything else is the same as yesterday.
Edit:
Here is a screenshot as requested:
It doesn't work in one specific file, in the other files it is working fine, here is the file where it doesn't work:
#extends('layouts.app')
#section('content')
<div class="flex justify-center ">
<div class="w-11/12 bg-gray-400 p-6 rounded-lg font-serif text-4xl font-bold bg-opacity-70 subpixel-antialiased tracking-wide not-italic">
<div class="p-10 shadow-2xl mb-10 bg-gradient-to-r from-green-400 to-blue-500 border-solid border-2 border-black rounded-lg">
<div class="bg-gray-100 shadow-2xl border-solid border-2 border-gray-500 rounded-lg">
<h1 class="pt-2 pl-4 text-4xl font-bold text-gray-900 title-font mb-8 underline">
{{ $post->Titel }}
</h1>
<div class="flex-grow">
<div>
<div class="pt-2 pl-4 pb-3 ml-8 font-medium text-base font-bold font-serif"> Standort: {{ $post->Standort }}</div>
<div class="pt-2 pl-4 pb-3 ml-8 font-medium text-base font-bold font-serif"> Kontakt: {{ $post->Kontakt }}</div>
<div class="pt-2 pl-4 pb-3 ml-8 font-medium text-base font-bold font-serif"> Startdatum: {{ $post->startdate }}</div>
<div class="pt-2 pl-4 pb-3 ml-8 font-medium text-base font-bold font-serif mb-8"> Enddatum: {{ $post->enddate }}</div>
<div class="flex-grow ml-5 ml-8 mb-5 content md:w-3/4 pr-4 text-lg text-justify tracking-widest leading-loose mr-7 subpixel-antialiased">
{!! $post->Beschreibung !!}
</div>
</div>
</div>
<div class="pt-2 pl-4 mb-2 ml-8 font-medium text-base font-bold font-serif"> Referenzcode: {{ $post->id }}</div>
<div class="flex justify-end font-medium text-base font-bold font-serif mb-5 ml-8 mr-8">
<a href="{{ route('bewerben', $post->id) }}">
<button type="submit" class="text-white px-4 py-3 rounded text-base font-medium
bg-gradient-to-r from-green-400 to-blue-500 float-right shadow transition
duration-500 ease-in-out transform hover:-translate-y-1 hover:scale-100">Direkt bewerben!
</button>
</a>
</div>
</div>
</div>
</div>
</div>
#endsection