fix: complete InvesteMoz validation and error corrections
This commit is contained in:
@@ -479,7 +479,7 @@ export default function Detail(p: Props) {
|
||||
const { auth } = usePage<{ auth: { user: unknown } }>().props;
|
||||
return (
|
||||
<Frame title={p.record.title || 'Pré-visualização da ideia'}>
|
||||
<ComplementEntryActions target={'partnership:'+p.record.id}/>
|
||||
<ComplementEntryActions target={'partnership:' + p.record.id} />
|
||||
<div className="space-y-6">
|
||||
<p>
|
||||
{p.record.partnership_type
|
||||
|
||||
@@ -196,7 +196,8 @@ function RoomPage(p: Props) {
|
||||
onSuccess: () => {
|
||||
message.setData({
|
||||
body: '',
|
||||
client_key: createOperationKey(),
|
||||
client_key:
|
||||
createOperationKey(),
|
||||
});
|
||||
},
|
||||
},
|
||||
@@ -242,11 +243,16 @@ function RoomPage(p: Props) {
|
||||
? `${p.documents.length} documento(s) disponível(is) para esta conta.`
|
||||
: 'Nenhum documento está autorizado para consulta por esta conta nesta sala.'}
|
||||
</p>
|
||||
{!mutable && p.documents.some((d) => d.shared && d.owner_id === auth.user.id) && (
|
||||
<p role="status" aria-live="polite">
|
||||
A sala está encerrada. O autor pode retirar uma autorização de partilha existente; novas partilhas permanecem indisponíveis.
|
||||
</p>
|
||||
)}
|
||||
{!mutable &&
|
||||
p.documents.some(
|
||||
(d) => d.shared && d.owner_id === auth.user.id,
|
||||
) && (
|
||||
<p role="status" aria-live="polite">
|
||||
A sala está encerrada. O autor pode retirar uma
|
||||
autorização de partilha existente; novas
|
||||
partilhas permanecem indisponíveis.
|
||||
</p>
|
||||
)}
|
||||
{p.documents.map((d) => (
|
||||
<article key={d.id}>
|
||||
<p>
|
||||
@@ -256,22 +262,23 @@ function RoomPage(p: Props) {
|
||||
: 'Privado do autor'}{' '}
|
||||
· Análise: {d.malware_scan_status}
|
||||
</p>
|
||||
{d.owner_id === auth.user.id && (mutable || d.shared) && (
|
||||
<button
|
||||
className="underline"
|
||||
onClick={() =>
|
||||
router.post(
|
||||
`/parcerias/salas/${p.room.id}/documentos/${d.id}/partilha`,
|
||||
{ shared: !d.shared },
|
||||
{ preserveScroll: true },
|
||||
)
|
||||
}
|
||||
>
|
||||
{d.shared
|
||||
? 'Retirar autorização de partilha'
|
||||
: 'Autorizar partilha com a contraparte'}
|
||||
</button>
|
||||
)}
|
||||
{d.owner_id === auth.user.id &&
|
||||
(mutable || d.shared) && (
|
||||
<button
|
||||
className="underline"
|
||||
onClick={() =>
|
||||
router.post(
|
||||
`/parcerias/salas/${p.room.id}/documentos/${d.id}/partilha`,
|
||||
{ shared: !d.shared },
|
||||
{ preserveScroll: true },
|
||||
)
|
||||
}
|
||||
>
|
||||
{d.shared
|
||||
? 'Retirar autorização de partilha'
|
||||
: 'Autorizar partilha com a contraparte'}
|
||||
</button>
|
||||
)}
|
||||
{d.status === 'active' &&
|
||||
d.malware_scan_status === 'clean' && (
|
||||
<a
|
||||
|
||||
Reference in New Issue
Block a user