Skip to content
Snippets Groups Projects
Commit d84c7ec3 authored by Johannes Goderbauer's avatar Johannes Goderbauer
Browse files

MSTeams: disabling should hide all fields

parent 64dda83e
No related branches found
No related tags found
No related merge requests found
Showing
with 125 additions and 73 deletions
...@@ -229,7 +229,6 @@ ...@@ -229,7 +229,6 @@
<iconId>NEON:PLUS</iconId> <iconId>NEON:PLUS</iconId>
<state>EDITABLE</state> <state>EDITABLE</state>
<stateProcess>%aditoprj%/entity/Member_entity/entityfields/msteamsactiongroup/children/createteam/stateProcess.js</stateProcess> <stateProcess>%aditoprj%/entity/Member_entity/entityfields/msteamsactiongroup/children/createteam/stateProcess.js</stateProcess>
<tooltip>Erstelle ein neues MicrosoftTeams Team</tooltip>
</entityActionField> </entityActionField>
<entityActionField> <entityActionField>
<name>editTeam</name> <name>editTeam</name>
...@@ -244,7 +243,6 @@ ...@@ -244,7 +243,6 @@
<onActionProcess>%aditoprj%/entity/Member_entity/entityfields/msteamsactiongroup/children/addapp/onActionProcess.js</onActionProcess> <onActionProcess>%aditoprj%/entity/Member_entity/entityfields/msteamsactiongroup/children/addapp/onActionProcess.js</onActionProcess>
<iconId>VAADIN:MOBILE</iconId> <iconId>VAADIN:MOBILE</iconId>
<stateProcess>%aditoprj%/entity/Member_entity/entityfields/msteamsactiongroup/children/addapp/stateProcess.js</stateProcess> <stateProcess>%aditoprj%/entity/Member_entity/entityfields/msteamsactiongroup/children/addapp/stateProcess.js</stateProcess>
<tooltip>Adds the MST ADITO App to the MSTTeam</tooltip>
</entityActionField> </entityActionField>
<entityActionField> <entityActionField>
<name>chooseTeam</name> <name>chooseTeam</name>
...@@ -252,7 +250,6 @@ ...@@ -252,7 +250,6 @@
<onActionProcess>%aditoprj%/entity/Member_entity/entityfields/msteamsactiongroup/children/chooseteam/onActionProcess.js</onActionProcess> <onActionProcess>%aditoprj%/entity/Member_entity/entityfields/msteamsactiongroup/children/chooseteam/onActionProcess.js</onActionProcess>
<iconId>NEON:GROUP_APPOINTMENT</iconId> <iconId>NEON:GROUP_APPOINTMENT</iconId>
<stateProcess>%aditoprj%/entity/Member_entity/entityfields/msteamsactiongroup/children/chooseteam/stateProcess.js</stateProcess> <stateProcess>%aditoprj%/entity/Member_entity/entityfields/msteamsactiongroup/children/chooseteam/stateProcess.js</stateProcess>
<tooltip>Wähle ein bereits hinterlegtes Team</tooltip>
</entityActionField> </entityActionField>
<entityActionField> <entityActionField>
<name>restoreTeam</name> <name>restoreTeam</name>
...@@ -260,7 +257,6 @@ ...@@ -260,7 +257,6 @@
<onActionProcess>%aditoprj%/entity/Member_entity/entityfields/msteamsactiongroup/children/restoreteam/onActionProcess.js</onActionProcess> <onActionProcess>%aditoprj%/entity/Member_entity/entityfields/msteamsactiongroup/children/restoreteam/onActionProcess.js</onActionProcess>
<iconId>VAADIN:ARROW_BACKWARD</iconId> <iconId>VAADIN:ARROW_BACKWARD</iconId>
<stateProcess>%aditoprj%/entity/Member_entity/entityfields/msteamsactiongroup/children/restoreteam/stateProcess.js</stateProcess> <stateProcess>%aditoprj%/entity/Member_entity/entityfields/msteamsactiongroup/children/restoreteam/stateProcess.js</stateProcess>
<tooltip>Stelle das Team wieder her</tooltip>
</entityActionField> </entityActionField>
<entityActionField> <entityActionField>
<name>changeToMSTeam</name> <name>changeToMSTeam</name>
...@@ -275,7 +271,6 @@ ...@@ -275,7 +271,6 @@
<onActionProcess>%aditoprj%/entity/Member_entity/entityfields/msteamsactiongroup/children/deleteteam/onActionProcess.js</onActionProcess> <onActionProcess>%aditoprj%/entity/Member_entity/entityfields/msteamsactiongroup/children/deleteteam/onActionProcess.js</onActionProcess>
<iconId>NEON:TRASH</iconId> <iconId>NEON:TRASH</iconId>
<stateProcess>%aditoprj%/entity/Member_entity/entityfields/msteamsactiongroup/children/deleteteam/stateProcess.js</stateProcess> <stateProcess>%aditoprj%/entity/Member_entity/entityfields/msteamsactiongroup/children/deleteteam/stateProcess.js</stateProcess>
<tooltip>Lösche das verknüpfte MSTeams Team</tooltip>
</entityActionField> </entityActionField>
</children> </children>
</entityActionGroup> </entityActionGroup>
......
import("MSTeams_lib");
import("system.vars"); import("system.vars");
import("system.neon"); import("system.neon");
import("system.result"); import("system.result");
import("Sql_lib"); import("Sql_lib");
var res = neon.COMPONENTSTATE_DISABLED;
var teamId = vars.exists("$param.MSTTeamId_param") ? vars.get("$param.MSTTeamId_param") : null; var teamId = vars.exists("$param.MSTTeamId_param") ? vars.get("$param.MSTTeamId_param") : null;
if (teamId && MSTeamsUtils.isTeamsEnabled())
{
var isArchived, serviceUrl;
var teamData = newSelect("IS_ARCHIVED, SERVICE_URL")
.from("MST_TEAM")
.whereIfSet("MST_TEAM.MST_TEAMID", teamId)
.arrayRow(true);
var isArchived, serviceUrl; if (teamData)
var teamData = newSelect("IS_ARCHIVED, SERVICE_URL") [isArchived, serviceUrl] = teamData;
.from("MST_TEAM")
.whereIfSet("MST_TEAM.MST_TEAMID", teamId)
.arrayRow(true);
if (teamData)
[isArchived, serviceUrl] = teamData;
if (isArchived == 1 || serviceUrl)
if (teamId == "" || isArchived == 1 || serviceUrl) {
{ res = neon.COMPONENTSTATE_DISABLED;
result.string(neon.COMPONENTSTATE_DISABLED); }
else
{
res = neon.COMPONENTSTATE_EDITABLE;
}
} }
else
{ result.string(res);
result.string(neon.COMPONENTSTATE_EDITABLE); \ No newline at end of file
}
\ No newline at end of file
import("MSTeams_lib");
import("system.vars"); import("system.vars");
import("system.neon"); import("system.neon");
import("system.result"); import("system.result");
import("Sql_lib"); import("Sql_lib");
var res = neon.COMPONENTSTATE_DISABLED;
var teamId = vars.exists("$param.MSTTeamId_param") ? vars.get("$param.MSTTeamId_param") : null; var teamId = vars.exists("$param.MSTTeamId_param") ? vars.get("$param.MSTTeamId_param") : null;
if (teamId && MSTeamsUtils.isTeamsEnabled())
var isArchived = newSelect("IS_ARCHIVED") {
.from("MST_TEAM") var isArchived = newSelect("IS_ARCHIVED")
.whereIfSet("MST_TEAM.MST_TEAMID", teamId) .from("MST_TEAM")
.cell(true); .whereIfSet("MST_TEAM.MST_TEAMID", teamId)
.cell(true);
if (teamId == "" || isArchived == 1) if (isArchived == 1)
{ {
result.string(neon.COMPONENTSTATE_DISABLED); res = neon.COMPONENTSTATE_DISABLED;
}
else
{
res = neon.COMPONENTSTATE_EDITABLE;
}
} }
else
{ result.string(res);
result.string(neon.COMPONENTSTATE_EDITABLE); \ No newline at end of file
}
\ No newline at end of file
import("MSTeams_lib");
import("system.vars"); import("system.vars");
import("system.neon"); import("system.neon");
import("system.result"); import("system.result");
import("Sql_lib"); import("Sql_lib");
import("MSTeams_lib");
var res = neon.COMPONENTSTATE_DISABLED;
var teamId = vars.exists("$param.MSTTeamId_param") ? vars.get("$param.MSTTeamId_param") : null; var teamId = vars.exists("$param.MSTTeamId_param") ? vars.get("$param.MSTTeamId_param") : null;
if (teamId && MSTeamsUtils.isTeamsEnabled())
var isArchived = newSelect("IS_ARCHIVED") {
var isArchived, serviceUrl;
var teamData = newSelect("IS_ARCHIVED, SERVICE_URL")
.from("MST_TEAM") .from("MST_TEAM")
.whereIfSet("MST_TEAM.MST_TEAMID", teamId) .whereIfSet("MST_TEAM.MST_TEAMID", teamId)
.cell(true); .arrayRow(true);
if (!teamId || isArchived == 1 || !MSTeamsUtils.isUserTeamOwner(teamId)) if (teamData)
{ [isArchived, serviceUrl] = teamData;
result.string(neon.COMPONENTSTATE_DISABLED);
if (isArchived == 1 || serviceUrl || !MSTeamsUtils.isUserTeamOwner(teamId))
{
res = neon.COMPONENTSTATE_DISABLED;
}
else
{
res = neon.COMPONENTSTATE_EDITABLE;
}
} }
else
{ result.string(res);
result.string(neon.COMPONENTSTATE_EDITABLE); \ No newline at end of file
}
\ No newline at end of file
import("MSTeams_lib");
import("system.vars"); import("system.vars");
import("system.neon"); import("system.neon");
import("system.result"); import("system.result");
import("Sql_lib"); import("Sql_lib");
import("MSTeams_lib");
var res = neon.COMPONENTSTATE_DISABLED;
var teamId = vars.exists("$param.MSTTeamId_param") ? vars.get("$param.MSTTeamId_param") : null; var teamId = vars.exists("$param.MSTTeamId_param") ? vars.get("$param.MSTTeamId_param") : null;
if (teamId && MSTeamsUtils.isTeamsEnabled())
var isArchived = newSelect("IS_ARCHIVED") {
var isArchived, serviceUrl;
var teamData = newSelect("IS_ARCHIVED, SERVICE_URL")
.from("MST_TEAM") .from("MST_TEAM")
.whereIfSet("MST_TEAM.MST_TEAMID", teamId) .whereIfSet("MST_TEAM.MST_TEAMID", teamId)
.cell(true); .arrayRow(true);
if (!teamId || isArchived == 1 || !MSTeamsUtils.isUserTeamOwner(teamId)) if (teamData)
{ [isArchived, serviceUrl] = teamData;
result.string(neon.COMPONENTSTATE_DISABLED);
if (isArchived == 1 || !MSTeamsUtils.isUserTeamOwner(teamId))
{
res = neon.COMPONENTSTATE_DISABLED;
}
else
{
res = neon.COMPONENTSTATE_EDITABLE;
}
} }
else
{ result.string(res);
result.string(neon.COMPONENTSTATE_EDITABLE); \ No newline at end of file
}
\ No newline at end of file
import("MSTeams_lib");
import("system.vars"); import("system.vars");
import("system.neon"); import("system.neon");
import("system.result"); import("system.result");
import("Sql_lib"); import("Sql_lib");
var res = neon.COMPONENTSTATE_DISABLED;
var teamId = vars.exists("$param.MSTTeamId_param") ? vars.get("$param.MSTTeamId_param") : null; var teamId = vars.exists("$param.MSTTeamId_param") ? vars.get("$param.MSTTeamId_param") : null;
if (teamId && MSTeamsUtils.isTeamsEnabled())
var isArchived = newSelect("IS_ARCHIVED") {
var isArchived, serviceUrl;
var teamData = newSelect("IS_ARCHIVED, SERVICE_URL")
.from("MST_TEAM") .from("MST_TEAM")
.whereIfSet("MST_TEAM.MST_TEAMID", teamId) .whereIfSet("MST_TEAM.MST_TEAMID", teamId)
.cell(true); .arrayRow(true);
if (teamId == "" || isArchived == 0) if (teamData)
{ [isArchived, serviceUrl] = teamData;
result.string(neon.COMPONENTSTATE_DISABLED);
if (isArchived == 0)
{
res = neon.COMPONENTSTATE_DISABLED;
}
else
{
res = neon.COMPONENTSTATE_EDITABLE;
}
} }
else
{ result.string(res);
result.string(neon.COMPONENTSTATE_EDITABLE); \ No newline at end of file
}
\ No newline at end of file
...@@ -754,7 +754,7 @@ ...@@ -754,7 +754,7 @@
<name>MST_TEAM_ID</name> <name>MST_TEAM_ID</name>
<title>Teams group</title> <title>Teams group</title>
<linkedContext>MSTTeam</linkedContext> <linkedContext>MSTTeam</linkedContext>
<state>READONLY</state> <state>INVISIBLE</state>
<stateProcess>%aditoprj%/entity/Salesproject_entity/entityfields/mst_team_id/stateProcess.js</stateProcess> <stateProcess>%aditoprj%/entity/Salesproject_entity/entityfields/mst_team_id/stateProcess.js</stateProcess>
<displayValueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/mst_team_id/displayValueProcess.js</displayValueProcess> <displayValueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/mst_team_id/displayValueProcess.js</displayValueProcess>
</entityField> </entityField>
......
import("MSTeams_lib");
import("system.result"); import("system.result");
import("Sql_lib"); import("Sql_lib");
result.string(newSelect("TEAMNAME") var res;
.from("MST_TEAM")
.whereIfSet("MST_TEAM.MST_TEAMID", "$field.MST_TEAM_ID") if (MSTeamsUtils.isTeamsEnabled())
.cell(true)); res = newSelect("TEAMNAME")
\ No newline at end of file .from("MST_TEAM")
.whereIfSet("MST_TEAM.MST_TEAMID", "$field.MST_TEAM_ID")
.cell(true);
else
res = "";
result.string(res);
\ No newline at end of file
import("MSTeams_lib");
import("system.result"); import("system.result");
import("system.vars"); import("system.vars");
import("system.neon"); import("system.neon");
result.string(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT ? neon.COMPONENTSTATE_INVISIBLE : neon.COMPONENTSTATE_READONLY); var res = neon.COMPONENTSTATE_INVISIBLE;
\ No newline at end of file var recordState = vars.get("$sys.recordstate");
if (MSTeamsUtils.isTeamsEnabled() && recordState != neon.OPERATINGSTATE_NEW && recordState != neon.OPERATINGSTATE_EDIT)
res = neon.COMPONENTSTATE_READONLY;
result.string(res);
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment