+ {isResolved || inDeliberation ? (
+
+ {isResolved ? (
+ Resolvido
+ ) : (
+ Em deliberação
+ )}
+
+ ) : null}
+
+ {isResolved ? (
+
+ Resolvido por {resolvedByName}
+ {resolvedAt ? ` em ${dateTimeFormatter.format(new Date(resolvedAt))}` : ''}
+
+ ) : null}
+
+ {capabilities.canAssign || responsibleId !== null ? (
+
+ ) : null}
+
+ {comments.length > 0 || capabilities.canComment ? (
+
+ ) : null}
+
+ {capabilities.canResolve ? (
+
+
+
+ ) : null}
+
+ )
+}
+
+const ResponsibleBlock = ({
+ updateId,
+ responsibleId,
+ responsibleName,
+ eligibleStaff,
+ canAssign,
+ formAction,
+}: {
+ updateId: number
+ responsibleId: number | null
+ responsibleName: string | null
+ eligibleStaff: EligibleUpdateStaffMember[]
+ canAssign: boolean
+ formAction: MunicipalityUpdateDeliberationFormActions['assign']
+}) => {
+ const [state, submitAction, isPending] = useActionState(formAction, {})
+
+ if (!canAssign) {
+ return (
+