fix: Two restore options when an archived document is deleted (#2194)
* Merge two menu items * Add deletedAt guard condition in document unarchive policy * Make the parentDocumentId null * Update test
This commit is contained in:
@@ -218,12 +218,7 @@ function DocumentMenu({
|
||||
items={[
|
||||
{
|
||||
title: t("Restore"),
|
||||
visible: !!can.unarchive,
|
||||
onClick: handleRestore,
|
||||
},
|
||||
{
|
||||
title: t("Restore"),
|
||||
visible: !!(collection && can.restore),
|
||||
visible: (!!collection && can.restore) || can.unarchive,
|
||||
onClick: handleRestore,
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user