fix: update ClientModal submit button logic to include email comparison and adjust ManagerSelect to ensure selected manager displays correctly
This commit is contained in:
@@ -108,7 +108,15 @@ function ClientModal({ client }: { client: Client }) {
|
||||
size="large"
|
||||
className="w-full"
|
||||
type="submit"
|
||||
disabled={!clientData.name || !clientData.phone || isPending}
|
||||
disabled={
|
||||
!clientData.name ||
|
||||
!clientData.phone ||
|
||||
isPending ||
|
||||
(clientData.name === client.name &&
|
||||
clientData.phone.replace(/\D/g, "") ===
|
||||
client.phone.replace(/\D/g, "") &&
|
||||
clientData.email === client.email)
|
||||
}
|
||||
>
|
||||
{isPending ? (
|
||||
<span className="size-[1.111vw] animate-spin text-[#7B60F3] flex items-center justify-center">
|
||||
|
||||
Reference in New Issue
Block a user