fix: project label error message added and ui improvement (#4895)
This commit is contained in:
parent
1b1302dfbd
commit
096d9b1541
3 changed files with 90 additions and 83 deletions
|
|
@ -115,6 +115,7 @@ export const CreateUpdateLabelInline = observer(
|
||||||
}, [labelToUpdate, setValue]);
|
}, [labelToUpdate, setValue]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
<form
|
<form
|
||||||
ref={ref}
|
ref={ref}
|
||||||
onSubmit={(e) => {
|
onSubmit={(e) => {
|
||||||
|
|
@ -173,6 +174,10 @@ export const CreateUpdateLabelInline = observer(
|
||||||
name="name"
|
name="name"
|
||||||
rules={{
|
rules={{
|
||||||
required: "Label title is required",
|
required: "Label title is required",
|
||||||
|
maxLength: {
|
||||||
|
value: 255,
|
||||||
|
message: "Label name should not exceed 255 characters",
|
||||||
|
},
|
||||||
}}
|
}}
|
||||||
render={({ field: { value, onChange, ref } }) => (
|
render={({ field: { value, onChange, ref } }) => (
|
||||||
<Input
|
<Input
|
||||||
|
|
@ -197,6 +202,8 @@ export const CreateUpdateLabelInline = observer(
|
||||||
{isUpdating ? (isSubmitting ? "Updating" : "Update") : isSubmitting ? "Adding" : "Add"}
|
{isUpdating ? (isSubmitting ? "Updating" : "Update") : isSubmitting ? "Adding" : "Add"}
|
||||||
</Button>
|
</Button>
|
||||||
</form>
|
</form>
|
||||||
|
{errors.name?.message && <p className="p-0.5 pl-8 text-sm text-red-500">{errors.name?.message}</p>}
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ export const LabelItemBlock = (props: ILabelItemBlock) => {
|
||||||
|
|
||||||
<div
|
<div
|
||||||
ref={actionSectionRef}
|
ref={actionSectionRef}
|
||||||
className={`absolute right-3 flex items-start gap-3.5 px-4 ${
|
className={`absolute right-2.5 flex items-start gap-3.5 px-4 ${
|
||||||
isMenuActive || isLabelGroup
|
isMenuActive || isLabelGroup
|
||||||
? "opacity-100"
|
? "opacity-100"
|
||||||
: "opacity-0 group-hover:pointer-events-auto group-hover:opacity-100"
|
: "opacity-0 group-hover:pointer-events-auto group-hover:opacity-100"
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ export const LabelName = (props: ILabelName) => {
|
||||||
const { name, color, isGroup } = props;
|
const { name, color, isGroup } = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3 pr-20">
|
||||||
{isGroup ? (
|
{isGroup ? (
|
||||||
<Component className="h-3.5 w-3.5" color={color} />
|
<Component className="h-3.5 w-3.5" color={color} />
|
||||||
) : (
|
) : (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue