bugs fixed for checklist page

This commit is contained in:
Yinyin Liu 2026-04-22 15:34:18 +02:00
parent 30499df329
commit 7e72940eae
4 changed files with 12 additions and 4 deletions

View File

@ -524,7 +524,13 @@ public static class UserMethods
Installation installation,
String notifiedByName)
{
var checklistLink = $"https://monitor.inesco.energy/sodiohome_installations/installation/{installation.Id}/checklist";
var productPath = installation.Product switch
{
4 => "sodistoregrid_installations",
5 => "sodistorepro_installations",
_ => "sodiohome_installations"
};
var checklistLink = $"https://monitor.inesco.energy/{productPath}/installation/{installation.Id}/checklist";
var installationName = String.IsNullOrEmpty(installation.Name) ? $"#{installation.Id}" : installation.Name;
var commentsBlock = String.IsNullOrWhiteSpace(item.Comments) ? "" : item.Comments;

View File

@ -388,7 +388,8 @@ function Installation(props: singleInstallationProps) {
currentTab != 'history' &&
// currentTab != 'manage' &&
currentTab != 'log' &&
currentTab != 'installationTickets' && (
currentTab != 'installationTickets' &&
currentTab != 'checklist' && (
<Container
maxWidth="xl"
sx={{

View File

@ -498,7 +498,8 @@ function SodioHomeInstallation(props: singleInstallationProps) {
currentTab != 'log' &&
currentTab != 'report' &&
currentTab != 'installationTickets' &&
currentTab != 'documents' && (
currentTab != 'documents' &&
currentTab != 'checklist' && (
<Container
maxWidth="xl"
sx={{

View File

@ -284,7 +284,7 @@ function SodioHomeInstallationTabs(props: SodioHomeInstallationTabsProps) {
const dataCollectionDisabled =
currentInstallation?.dataCollectionEnabled === false
|| (installations.length === 1 && installations[0].dataCollectionEnabled === false);
const allowedWhenDisabled = ['list', 'tree', 'information', 'history', 'installationTickets', 'documents'];
const allowedWhenDisabled = ['list', 'tree', 'information', 'history', 'installationTickets', 'documents', 'checklist'];
const tabs = inInstallationView && currentUser.userType == UserType.admin
? [