add deleted warning to edit page

This commit is contained in:
Brandon Thomas committed 2022-01-03 13:47:53 -05:00
1 parent 6d406a83ab
commit 5b7efcbc70
1 file changed
+14
@@ -126,6 +126,7 @@ function TtsEditCategoriesPage(props: Props) {
{assignedCategories.map(category => {
let notApprovedWarning = null;
let modelsNotAllowedWarning = null;
let deletedWarning = null;
if (!category.can_directly_have_models) {
modelsNotAllowedWarning = (
@@ -139,6 +140,18 @@ function TtsEditCategoriesPage(props: Props) {
)
}
if (!!category.category_deleted_at) {
deletedWarning = (
<>
<span className="tag is-rounded is-warning is-medium is-light">
Deleted category
&nbsp;
<FontAwesomeIcon icon={faExclamationCircle} />
</span>
</>
)
}
if (!category.is_mod_approved) {
notApprovedWarning = (
<>
@@ -156,6 +169,7 @@ function TtsEditCategoriesPage(props: Props) {
<span className="content is-medium">{category.name}</span>
{modelsNotAllowedWarning}
{notApprovedWarning}
{deletedWarning}
&nbsp;
<button
className="button is-rounded is-danger is-small is-light"