Merge branch 'main' into logAndException
commit
5ff10c4f8d
|
|
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
||||||
|
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
import org.checkerframework.common.util.report.qual.ReportCall;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||||
|
|
|
||||||
|
|
@ -116,14 +116,22 @@ public class Change {
|
||||||
.filter(peopleFullName::equals)
|
.filter(peopleFullName::equals)
|
||||||
.isPresent());
|
.isPresent());
|
||||||
|
|
||||||
var state = getValue(entry, "State").getIntValue();
|
// var state = getValue(entry, "State").getIntValue();
|
||||||
var inApproval = inApprovalList(api.getUser(), getValueStringByID(entry, "ChangeNr"));
|
// var inApproval = inApprovalList(api.getUser(), getValueStringByID(entry,
|
||||||
|
// "ChangeNr"));
|
||||||
|
|
||||||
change.setFlagPermit(flagPermit(state));
|
// change.setFlagPermit(flagPermit(state));
|
||||||
change.setFlagApprove(flagApproval(inApproval, state));
|
// change.setFlagApprove(flagApproval(inApproval, state));
|
||||||
change.setFlagReject(flagApproval(inApproval, state));
|
// change.setFlagReject(flagApproval(inApproval, state));
|
||||||
change.setFlagCancel(flagCancel(getValueStringByID(entry, "SupportGroupId"), state));
|
// change.setFlagCancel(flagCancel(getValueStringByID(entry, "SupportGroupId"),
|
||||||
|
// state));
|
||||||
|
|
||||||
|
try {
|
||||||
|
change.setPackageName(
|
||||||
|
queryPackageName(getValueStringByID(entry, "PackageType").toString()));
|
||||||
|
} catch (ARException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
changes.add(change);
|
changes.add(change);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -157,74 +165,92 @@ public class Change {
|
||||||
return peopleInfos.get(0).get(queryPerson.getFieldId("FullName")).toString();
|
return peopleInfos.get(0).get(queryPerson.getFieldId("FullName")).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* Determines if the change item can be approved based on the approval status
|
// * Determines if the change item can be approved based on the approval status
|
||||||
* and the current state.
|
// * and the current state.
|
||||||
*
|
// *
|
||||||
* @param approval The flag indicating whether the change item has been
|
// * @param approval The flag indicating whether the change item has been
|
||||||
* approved.
|
// * approved.
|
||||||
* @param state The current state of the change item.
|
// * @param state The current state of the change item.
|
||||||
* @return {@code true} if the change item can be approved, {@code false}
|
// * @return {@code true} if the change item can be approved, {@code false}
|
||||||
* otherwise.
|
// * otherwise.
|
||||||
*/
|
// */
|
||||||
public boolean flagApproval(boolean approval, int state) {
|
// public boolean flagApproval(boolean approval, int state) {
|
||||||
boolean approvableState = (state == 1 || state == 10);
|
// boolean approvableState = (state == 1 || state == 10);
|
||||||
return approval && approvableState;
|
// return approval && approvableState;
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* Determines if the change item can be canceled based on the support group ID
|
// * Determines if the change item can be canceled based on the support group ID
|
||||||
* and the current state.
|
// * and the current state.
|
||||||
*
|
// *
|
||||||
* @param supportGroupId The ID of the support group associated with the change
|
// * @param supportGroupId The ID of the support group associated with the
|
||||||
* item
|
// change item
|
||||||
* @param state The current state of the change item
|
// * @param state The current state of the change item
|
||||||
* @return {@code true} if the change item can be canceled, {@code false}
|
// * @return {@code true} if the change item can be canceled, {@code false}
|
||||||
* otherwise.
|
// otherwise.
|
||||||
* @throws ARException if an error occurs during the operation
|
// * @throws ARException if an error occurs during the operation
|
||||||
*/
|
// */
|
||||||
public boolean flagCancel(String supportGroupId, int state) throws ARException {
|
// public boolean flagCancel(String supportGroupId, int state) throws
|
||||||
var queryRoles = new Query.QueryBuilder("CTM:SupportGroupFuncRoleLookUp").addFieldId("Role", 1000000014)
|
// ARException {
|
||||||
.build();
|
// var queryRoles = new
|
||||||
var role = api.queryFieldsById("\'Support Group ID\' = \"" + supportGroupId + "\"",
|
// Query.QueryBuilder("CTM:SupportGroupFuncRoleLookUp").addFieldId("Role",
|
||||||
queryRoles.getFieldIds(), queryRoles.getFormName(), null, 0, 0)
|
// 1000000014)
|
||||||
.get(0).get(queryRoles.getFieldId("Role")).toString();
|
// .build();
|
||||||
|
// var role = api.queryFieldsById("\'Support Group ID\' = \"" + supportGroupId +
|
||||||
|
// "\"",
|
||||||
|
// queryRoles.getFieldIds(), queryRoles.getFormName(), null, 0, 0)
|
||||||
|
// .get(0).get(queryRoles.getFieldId("Role")).toString();
|
||||||
|
|
||||||
boolean approvableState = state == 1;
|
// boolean approvableState = state == 1;
|
||||||
boolean isChangeManager = role.equals("Change Manager");
|
// boolean isChangeManager = role.equals("Change Manager");
|
||||||
|
|
||||||
return approvableState && isChangeManager;
|
// return approvableState && isChangeManager;
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* Determines if the change item has a permit based on the current state.
|
// * Determines if the change item has a permit based on the current state.
|
||||||
*
|
// *
|
||||||
* @param state The current state of the change item.
|
// * @param state The current state of the change item.
|
||||||
* @return {@code true} if the change item has a permit, {@code false}
|
// * @return {@code true} if the change item has a permit, {@code false}
|
||||||
* otherwise.
|
// otherwise.
|
||||||
*/
|
// */
|
||||||
public boolean flagPermit(int state) {
|
// public boolean flagPermit(int state) {
|
||||||
return state == 0;
|
// return state == 0;
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* Checks if the logged in user is in the approval list for the specified change
|
// * Checks if the logged in user is in the approval list for the specified
|
||||||
* item.
|
// change item.
|
||||||
*
|
// *
|
||||||
* @param user The username of the user to check
|
// * @param user The username of the user to check
|
||||||
* @param changeNr The change number of the change item
|
// * @param changeNr The change number of the change item
|
||||||
* @return {@code true} if the user is in the approval list, {@code false}
|
// * @return {@code true} if the user is in the approval list, {@code false}
|
||||||
* otherwise.
|
// otherwise.
|
||||||
* @throws ARException if an error occurs during the operation
|
// * @throws ARException if an error occurs during the operation
|
||||||
*/
|
// */
|
||||||
public boolean inApprovalList(String user, String changeNr) throws ARException {
|
// public boolean inApprovalList(String user, String changeNr) throws
|
||||||
var queryApprovalList = new Query.QueryBuilder("ASF:OverviewConsole_TicketsJoinAPDetailSignature")
|
// ARException {
|
||||||
.addFieldId("Approvers", 13207).build();
|
// var queryApprovalList = new
|
||||||
var approversOI = api.queryFieldsById("\'Ticketnumber\' = \"" + changeNr + "\"",
|
// Query.QueryBuilder("ASF:OverviewConsole_TicketsJoinAPDetailSignature")
|
||||||
queryApprovalList.getFieldIds(), queryApprovalList.getFormName(), null, 0, 0);
|
// .addFieldId("Approvers", 13207).build();
|
||||||
var approvers = approversOI.isEmpty() ? null
|
// var approversOI = api.queryFieldsById("\'Ticketnumber\' = \"" + changeNr +
|
||||||
: approversOI.get(0).get(queryApprovalList.getFieldId("Approvers")).toString();
|
// "\"",
|
||||||
return approvers != null ? approvers.contains(user) : false;
|
// queryApprovalList.getFieldIds(), queryApprovalList.getFormName(), null, 0,
|
||||||
|
// 0);
|
||||||
|
// var approvers = approversOI.isEmpty() ? null
|
||||||
|
// :
|
||||||
|
// approversOI.get(0).get(queryApprovalList.getFieldId("Approvers")).toString();
|
||||||
|
// return approvers != null ? approvers.contains(user) : false;
|
||||||
|
// }
|
||||||
|
private String queryPackageName(String packageType) throws ARException {
|
||||||
|
var queryPackage = new Query.QueryBuilder("CTR:GenericContractJoinCFG_Package")
|
||||||
|
.addFieldId("PackageName", 200000020).build();
|
||||||
|
var packageName = api
|
||||||
|
.queryFieldsById("\'InstanceId_Package\' = \"" + packageType + "\"",
|
||||||
|
queryPackage.getFieldIds(), queryPackage.getFormName(), null, 0, 0)
|
||||||
|
.get(0);
|
||||||
|
return packageName.get(queryPackage.getFieldId("PackageName")).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -27,14 +27,15 @@ public class ChangeItem {
|
||||||
private String changeImplementerPersonId;
|
private String changeImplementerPersonId;
|
||||||
private boolean implementerEdit;
|
private boolean implementerEdit;
|
||||||
private String packageType;
|
private String packageType;
|
||||||
|
private String packageName;
|
||||||
private Date D1;
|
private Date D1;
|
||||||
private Date D2;
|
private Date D2;
|
||||||
private Date D3;
|
private Date D3;
|
||||||
private Date D4;
|
private Date D4;
|
||||||
private boolean flagPermit;
|
// private boolean flagPermit;
|
||||||
private boolean flagApprove;
|
// private boolean flagApprove;
|
||||||
private boolean flagReject;
|
// private boolean flagReject;
|
||||||
private boolean flagCancel;
|
// private boolean flagCancel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -160,84 +161,92 @@ public class ChangeItem {
|
||||||
this.changeImplementerPersonId = changeImplementerPersonId;
|
this.changeImplementerPersonId = changeImplementerPersonId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* Retrieves the flag indicating whether the change item has a permit.
|
// * Retrieves the flag indicating whether the change item has a permit.
|
||||||
*
|
// *
|
||||||
* @return {@code true} if the change item has a permit, {@code false}
|
// * @return {@code true} if the change item has a permit, {@code false}
|
||||||
* otherwise.
|
// * otherwise.
|
||||||
*/
|
// */
|
||||||
public boolean getFlagPermit() {
|
// public boolean getFlagPermit() {
|
||||||
return this.flagPermit;
|
// return this.flagPermit;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * Sets the flag indicating whether the change item has a permit.
|
||||||
|
// *
|
||||||
|
// * @param flagPermit {@code true} if the change item has a permit, {@code false}
|
||||||
|
// * otherwise.
|
||||||
|
// */
|
||||||
|
// public void setFlagPermit(boolean flagPermit) {
|
||||||
|
// this.flagPermit = flagPermit;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * Retrieves the flag indicating whether the change item has been approved.
|
||||||
|
// *
|
||||||
|
// * @return {@code true} if the change item has been approved, {@code false}
|
||||||
|
// * otherwise.
|
||||||
|
// */
|
||||||
|
// public boolean getFlagApprove() {
|
||||||
|
// return this.flagApprove;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * Sets the flag indicating whether the change item has been approved.
|
||||||
|
// *
|
||||||
|
// * @param flagApprove {@code true} if the change item has been approved,
|
||||||
|
// * {@code false} otherwise.
|
||||||
|
// */
|
||||||
|
// public void setFlagApprove(boolean flagApprove) {
|
||||||
|
// this.flagApprove = flagApprove;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * Retrieves the flag indicating whether the change item has been rejected.
|
||||||
|
// *
|
||||||
|
// * @return {@code true} if the change item has been rejected, {@code false}
|
||||||
|
// * otherwise.
|
||||||
|
// */
|
||||||
|
// public boolean getFlagReject() {
|
||||||
|
// return this.flagReject;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * Sets the flag indicating whether the change item has been rejected.
|
||||||
|
// *
|
||||||
|
// * @param flagReject {@code true} if the change item has been rejected,
|
||||||
|
// * {@code false} otherwise.
|
||||||
|
// */
|
||||||
|
// public void setFlagReject(boolean flagReject) {
|
||||||
|
// this.flagReject = flagReject;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * Retrieves the flag indicating whether the change item has been canceled.
|
||||||
|
// *
|
||||||
|
// * @return {@code true} if the change item has been canceled, {@code false}
|
||||||
|
// * otherwise.
|
||||||
|
// */
|
||||||
|
// public boolean getFlagCancel() {
|
||||||
|
// return this.flagCancel;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * Sets the flag indicating whether the change item has been canceled.
|
||||||
|
// *
|
||||||
|
// * @param flagCancel {@code true} if the change item has been canceled,
|
||||||
|
// * {@code false} otherwise.
|
||||||
|
// */
|
||||||
|
// public void setFlagCancel(boolean flagCancel) {
|
||||||
|
// this.flagCancel = flagCancel;
|
||||||
|
// }
|
||||||
|
|
||||||
|
public String getPackageName() {
|
||||||
|
return this.packageName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public void setPackageName(String packageName) {
|
||||||
* Sets the flag indicating whether the change item has a permit.
|
this.packageName = packageName;
|
||||||
*
|
|
||||||
* @param flagPermit {@code true} if the change item has a permit, {@code false}
|
|
||||||
* otherwise.
|
|
||||||
*/
|
|
||||||
public void setFlagPermit(boolean flagPermit) {
|
|
||||||
this.flagPermit = flagPermit;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Retrieves the flag indicating whether the change item has been approved.
|
|
||||||
*
|
|
||||||
* @return {@code true} if the change item has been approved, {@code false}
|
|
||||||
* otherwise.
|
|
||||||
*/
|
|
||||||
public boolean getFlagApprove() {
|
|
||||||
return this.flagApprove;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the flag indicating whether the change item has been approved.
|
|
||||||
*
|
|
||||||
* @param flagApprove {@code true} if the change item has been approved,
|
|
||||||
* {@code false} otherwise.
|
|
||||||
*/
|
|
||||||
public void setFlagApprove(boolean flagApprove) {
|
|
||||||
this.flagApprove = flagApprove;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Retrieves the flag indicating whether the change item has been rejected.
|
|
||||||
*
|
|
||||||
* @return {@code true} if the change item has been rejected, {@code false}
|
|
||||||
* otherwise.
|
|
||||||
*/
|
|
||||||
public boolean getFlagReject() {
|
|
||||||
return this.flagReject;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the flag indicating whether the change item has been rejected.
|
|
||||||
*
|
|
||||||
* @param flagReject {@code true} if the change item has been rejected,
|
|
||||||
* {@code false} otherwise.
|
|
||||||
*/
|
|
||||||
public void setFlagReject(boolean flagReject) {
|
|
||||||
this.flagReject = flagReject;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Retrieves the flag indicating whether the change item has been canceled.
|
|
||||||
*
|
|
||||||
* @return {@code true} if the change item has been canceled, {@code false}
|
|
||||||
* otherwise.
|
|
||||||
*/
|
|
||||||
public boolean getFlagCancel() {
|
|
||||||
return this.flagCancel;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the flag indicating whether the change item has been canceled.
|
|
||||||
*
|
|
||||||
* @param flagCancel {@code true} if the change item has been canceled,
|
|
||||||
* {@code false} otherwise.
|
|
||||||
*/
|
|
||||||
public void setFlagCancel(boolean flagCancel) {
|
|
||||||
this.flagCancel = flagCancel;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -71,19 +71,22 @@ public class SupportGroup {
|
||||||
* @throws ARException if an error occurs during the query
|
* @throws ARException if an error occurs during the query
|
||||||
*/
|
*/
|
||||||
public void queryUserSupportGroup(RemedyJavaAPI api) throws ARException {
|
public void queryUserSupportGroup(RemedyJavaAPI api) throws ARException {
|
||||||
var querySupportGroups = new Query.QueryBuilder("CTM:Support Group Association")
|
|
||||||
.addFieldId("SupportGroup", 1000000017)
|
|
||||||
.addFieldId("SupportGroupId", 1000000079)
|
|
||||||
.build();
|
|
||||||
|
|
||||||
api.impersonateUser("ext_StanzPa");
|
api.impersonateUser("ext_StanzPa");
|
||||||
var supportGroupUser = api.queryFieldsById("\'Login ID\' = \"" + api.getUser() + "\"",
|
|
||||||
querySupportGroups.getFieldIds(), querySupportGroups.getFormName(), null, 0, 0);
|
|
||||||
|
|
||||||
var result = supportGroupUser.isEmpty() ? null : supportGroupUser.get(0);
|
var querySupportGroups = new Query.QueryBuilder("CTM:Support Group Association")
|
||||||
if (result != null) {
|
.addFieldId("SupportGroupId", 1000000079).build();
|
||||||
String supportGroupName = result.get(querySupportGroups.getFieldId("SupportGroup")).toString();
|
var supportGroupIdOfUser = api.queryFieldsById("\'Login ID\' = \"" + api.getUser() + "\"",
|
||||||
String supportGroupId = result.get(querySupportGroups.getFieldId("SupportGroupId")).toString();
|
querySupportGroups.getFieldIds(), querySupportGroups.getFormName(), null, 0, 0);
|
||||||
|
var id = supportGroupIdOfUser.isEmpty() ? null : supportGroupIdOfUser.get(0);
|
||||||
|
|
||||||
|
if (id != null) {
|
||||||
|
var supportGroupId = id.get(querySupportGroups.getFieldId("SupportGroupId")).toString();
|
||||||
|
var querySupportGroupName = new Query.QueryBuilder(formName).addFieldId("SupportGroupName", 1000000015)
|
||||||
|
.build();
|
||||||
|
var supportGroupNameOfUser = api.queryFieldsById("\'Support Group ID\' = \"" + supportGroupId + "\"",
|
||||||
|
querySupportGroupName.getFieldIds(), querySupportGroupName.getFormName(), null, 0, 0);
|
||||||
|
var supportGroupName = supportGroupNameOfUser.get(0)
|
||||||
|
.get(querySupportGroupName.getFieldId("SupportGroupName")).toString();
|
||||||
this.userSupportGroup = new SupportGroupGetResponse(supportGroupName, supportGroupId);
|
this.userSupportGroup = new SupportGroupGetResponse(supportGroupName, supportGroupId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -275,12 +275,29 @@ export class DataService {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
res.push({resourceId: resp.resourceId, approvalStatus: this.validateApproval(resp.approvalStatus), statusReason: resp.statusReason,
|
res.push({
|
||||||
changeNr: resp.changeNr, resourceName: resp.resourceName,
|
resourceId: resp.resourceId,
|
||||||
vertrag: resp.contract, vertragName: this.getContractName(resp.contract), isExpand: false,
|
approvalStatus: this.validateApproval(resp.approvalStatus),
|
||||||
isRes: true, state: resp.state, stateName: this.getStateNameById(resp.state),
|
statusReason: resp.statusReason,
|
||||||
supportGroup: resp.supportGroup, tasks: tasks, supportGroupId: resp.supportGroupId,
|
changeNr: resp.changeNr,
|
||||||
implementerEdit: resp.implementerEdit, flagApprove: resp.flagApprove, flagCancel: resp.flagChancel, flagPermit: resp.flagPermit, flagReject: resp.flagReject
|
resourceName: resp.resourceName,
|
||||||
|
vertrag: resp.contract,
|
||||||
|
vertragName: this.getContractName(resp.contract),
|
||||||
|
isExpand: false,
|
||||||
|
isRes: true,
|
||||||
|
state: resp.state,
|
||||||
|
stateName: this.getStateNameById(resp.state),
|
||||||
|
supportGroup: resp.supportGroup,
|
||||||
|
tasks: tasks,
|
||||||
|
supportGroupId: resp.supportGroupId,
|
||||||
|
implementerEdit: resp.implementerEdit,
|
||||||
|
flagApprove: resp.flagApprove,
|
||||||
|
flagCancel: resp.flagChancel,
|
||||||
|
flagPermit: resp.flagPermit,
|
||||||
|
flagReject: resp.flagReject,
|
||||||
|
changeImplementerLogin: resp.changeImplementerLogin,
|
||||||
|
packageName: resp.packageName,
|
||||||
|
coordinatorSg: resp.coordinatorSg
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -115,13 +115,16 @@
|
||||||
<td style="padding:3px">{{lMap.get('tooltipState')}}: {{dataService.getStateNameById(data.taskData.resources[0].state)}}</td>
|
<td style="padding:3px">{{lMap.get('tooltipState')}}: {{dataService.getStateNameById(data.taskData.resources[0].state)}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding:3px">{{lMap.get('tooltipPaketType')}}: {{data.taskData.resources[0].paketType}}</td>
|
<td style="padding:3px">{{lMap.get('tooltipPaketType')}}: {{data.taskData.resources[0].packageName}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding:3px">{{lMap.get('tooltipContract')}}: {{data.taskData.resources[0].vertragName}}</td>
|
<td style="padding:3px">{{lMap.get('tooltipContract')}}: {{data.taskData.resources[0].vertragName}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding:3px"> {{lMap.get('tooltipSupportGroup')}}: {{data.taskData.resources[0].supportGroup}}</td>
|
<td style="padding:3px">{{lMap.get('tooltipSupportGroupKv')}}: {{data.taskData.resources[0].supportGroup}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="padding:3px">{{lMap.get('tooltipSupportGroupIh')}}: {{data.taskData.resources[0].coordinatorSg}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding:3px">{{lMap.get('tooltipDate')}}: {{data.taskData.resources[0].tasks[1].StartDate | date:'dd.MM.yyyy'}}</td>
|
<td style="padding:3px">{{lMap.get('tooltipDate')}}: {{data.taskData.resources[0].tasks[1].StartDate | date:'dd.MM.yyyy'}}</td>
|
||||||
|
|
|
||||||
|
|
@ -162,11 +162,15 @@ export class NttGanttComponent implements OnInit {
|
||||||
this.enMap.set('tooltipPaketType', 'Package Type');
|
this.enMap.set('tooltipPaketType', 'Package Type');
|
||||||
this.deMap.set('tooltipContract', 'Vertrag / Provider Cluster');
|
this.deMap.set('tooltipContract', 'Vertrag / Provider Cluster');
|
||||||
this.enMap.set('tooltipContract', 'Contract / Provider Cluster');
|
this.enMap.set('tooltipContract', 'Contract / Provider Cluster');
|
||||||
this.deMap.set('tooltipSupportGroup', 'Support Gruppe (IH/KV)');
|
this.deMap.set('tooltipSupportGroupKv', 'KV SG');
|
||||||
this.enMap.set('tooltipSupportGroup', 'Support Group (IH/KV)');
|
this.enMap.set('tooltipSupportGroupKv', 'KV SG');
|
||||||
|
this.deMap.set('tooltipSupportGroupIh', 'IH SG');
|
||||||
|
this.enMap.set('tooltipSupportGroupIh', 'IH SG');
|
||||||
this.deMap.set('tooltipDate', 'Geplantes Start Datum');
|
this.deMap.set('tooltipDate', 'Geplantes Start Datum');
|
||||||
this.enMap.set('tooltipDate', 'Planned Start Date');
|
this.enMap.set('tooltipDate', 'Planned Start Date');
|
||||||
|
|
||||||
|
this.deMap.set('permit', 'Zur Genehmigung');
|
||||||
|
this.enMap.set('permit', 'Permit');
|
||||||
this.deMap.set('genehmigen', 'Genehmigen');
|
this.deMap.set('genehmigen', 'Genehmigen');
|
||||||
this.enMap.set('genehmigen', 'Approve');
|
this.enMap.set('genehmigen', 'Approve');
|
||||||
this.deMap.set('ablehnen', 'Ablehnen');
|
this.deMap.set('ablehnen', 'Ablehnen');
|
||||||
|
|
@ -222,14 +226,11 @@ export class NttGanttComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public logg(args){
|
public logg(args){
|
||||||
console.log(args);
|
console.log(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The function ngOnInit sets values which are required for rendering the gantt Chart. Furthermore it trims the resources (Changes Array) and sets the paginator to the first page.
|
* The function ngOnInit sets values which are required for rendering the gantt Chart. Furthermore it trims the resources (Changes Array) and sets the paginator to the first page.
|
||||||
*/
|
*/
|
||||||
|
|
@ -609,6 +610,11 @@ public logg(args){
|
||||||
this.selRecs = this.selectedrecords;
|
this.selRecs = this.selectedrecords;
|
||||||
}
|
}
|
||||||
let allStates: boolean = true;
|
let allStates: boolean = true;
|
||||||
|
let allPermit: boolean = true;
|
||||||
|
let allApprove: boolean = true;
|
||||||
|
let allReject: boolean = true;
|
||||||
|
let allCancel: boolean = true;
|
||||||
|
let allImplementer: boolean = true;
|
||||||
this.selectedRescourceIds = [];
|
this.selectedRescourceIds = [];
|
||||||
for (const change of this.selRecs) {
|
for (const change of this.selRecs) {
|
||||||
if(change.taskData.approvalStatus == 1){
|
if(change.taskData.approvalStatus == 1){
|
||||||
|
|
@ -622,23 +628,54 @@ public logg(args){
|
||||||
}else{
|
}else{
|
||||||
allStates = false;
|
allStates = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(change.taskData.flagPermit == true && allPermit == true){
|
||||||
|
allPermit = true;
|
||||||
|
}else{
|
||||||
|
allPermit = false;
|
||||||
|
}
|
||||||
|
if(change.taskData.flagApproval == true && allApprove == true){
|
||||||
|
allApprove = true;
|
||||||
|
}else{
|
||||||
|
allApprove = false;
|
||||||
|
}
|
||||||
|
if(change.taskData.flagReject == true && allCancel == true){
|
||||||
|
allReject = true;
|
||||||
|
}else{
|
||||||
|
allReject = false;
|
||||||
|
}
|
||||||
|
if(change.taskData.flagCancel == true && allCancel == true){
|
||||||
|
allCancel = true;
|
||||||
|
}else{
|
||||||
|
allCancel = false;
|
||||||
|
}
|
||||||
|
if(change.taskData.implementerEdit == true && allImplementer == true){
|
||||||
|
allImplementer = true;
|
||||||
|
}else{
|
||||||
|
allImplementer = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(allStates){
|
if(allStates){
|
||||||
if(this.approvalPending == true){
|
this.toolbar = [];
|
||||||
this.toolbar = ['Cancel',{text: this.lMap.get("genehmigen"), id: "7"},{text:this.lMap.get("ablehnen"), id: "8"}];
|
this.toolbar.push({text:this.lMap.get("stateChange"), id: "6"});
|
||||||
|
if(allPermit){
|
||||||
|
this.toolbar.push({text: this.lMap.get("permit"), id: "5"});
|
||||||
}
|
}
|
||||||
else{
|
if(allApprove){
|
||||||
if(this.selRecs[0].taskData.state > 0 &&this.selRecs[0].taskData.state < 4){
|
this.toolbar.push({text: this.lMap.get("genehmigen"), id: "7"});
|
||||||
this.toolbar = ['Cancel',{text: this.lMap.get("stateChange"), id: "6"} ,{text: this.lMap.get("implementer"), id: "10"}];
|
}
|
||||||
|
if(allReject){
|
||||||
|
this.toolbar.push({text: this.lMap.get("ablehnen"), id: "8"});
|
||||||
|
}
|
||||||
|
if(allCancel){
|
||||||
|
this.toolbar.push({text: this.lMap.get("stornieren"), id: "11"});
|
||||||
|
}
|
||||||
|
if(allImplementer){
|
||||||
|
this.toolbar.push({text: this.lMap.get("implementer"), id: "10"});
|
||||||
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
this.toolbar = ['Cancel',{text: this.lMap.get("stateChange"), id: "6"}];
|
this.toolbar = [];
|
||||||
if(this.selRecs[0].taskData.state == 0){
|
|
||||||
this.toolbar = [{text: this.lMap.get("stornieren"), id: "11"},{text:this.lMap.get("stateChange"), id: "6"} ,{text: this.lMap.get("implementer"), id: "10"}];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
this.toolbar = ['Cancel'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -672,6 +709,11 @@ public logg(args){
|
||||||
this.selRecs = this.selectedrecords;
|
this.selRecs = this.selectedrecords;
|
||||||
}
|
}
|
||||||
let allStates: boolean = true;
|
let allStates: boolean = true;
|
||||||
|
let allPermit: boolean = true;
|
||||||
|
let allApprove: boolean = true;
|
||||||
|
let allReject: boolean = true;
|
||||||
|
let allCancel: boolean = true;
|
||||||
|
let allImplementer: boolean = true;
|
||||||
this.selectedRescourceIds = [];
|
this.selectedRescourceIds = [];
|
||||||
for (const change of this.selRecs) {
|
for (const change of this.selRecs) {
|
||||||
if(change.taskData.state == this.selRecs[0].taskData.state){
|
if(change.taskData.state == this.selRecs[0].taskData.state){
|
||||||
|
|
@ -685,23 +727,56 @@ public logg(args){
|
||||||
}else{
|
}else{
|
||||||
allStates = false;
|
allStates = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(change.taskData.flagPermit == true && allPermit == true){
|
||||||
|
allPermit = true;
|
||||||
|
}else{
|
||||||
|
allPermit = false;
|
||||||
|
}
|
||||||
|
if(change.taskData.flagApproval == true && allApprove == true){
|
||||||
|
allApprove = true;
|
||||||
|
}else{
|
||||||
|
allApprove = false;
|
||||||
|
}
|
||||||
|
if(change.taskData.flagReject == true && allReject == true){
|
||||||
|
allReject = true;
|
||||||
|
}else{
|
||||||
|
allReject = false;
|
||||||
|
}
|
||||||
|
if(change.taskData.flagCancel == true && allCancel == true){
|
||||||
|
allCancel = true;
|
||||||
|
}else{
|
||||||
|
allCancel = false;
|
||||||
|
}
|
||||||
|
if(change.taskData.implementerEdit == true && allImplementer == true){
|
||||||
|
allImplementer = true;
|
||||||
|
}else{
|
||||||
|
allImplementer = false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if(allStates){
|
if(allStates){
|
||||||
if(this.approvalPending == true){
|
this.toolbar = [];
|
||||||
this.toolbar = ['Cancel',{text: this.lMap.get("genehmigen"), id: "7"},{text: this.lMap.get("ablehnen"), id: "8"}];
|
this.toolbar.push({text:this.lMap.get("stateChange"), id: "6"});
|
||||||
|
if(allPermit){
|
||||||
|
this.toolbar.push({text: this.lMap.get("permit"), id: "5"});
|
||||||
}
|
}
|
||||||
else{
|
if(allApprove){
|
||||||
if(this.selRecs[0].taskData.state > 0 &&this.selRecs[0].taskData.state < 4){
|
this.toolbar.push({text: this.lMap.get("genehmigen"), id: "7"});
|
||||||
this.toolbar = ['Cancel',{text: this.lMap.get("stateChange"), id: "6"} ,{text: this.lMap.get("implementer"), id: "10"}];
|
}
|
||||||
|
if(allReject){
|
||||||
|
this.toolbar.push({text: this.lMap.get("ablehnen"), id: "8"});
|
||||||
|
}
|
||||||
|
if(allCancel){
|
||||||
|
this.toolbar.push({text: this.lMap.get("stornieren"), id: "11"});
|
||||||
|
}
|
||||||
|
if(allImplementer){
|
||||||
|
this.toolbar.push({text: this.lMap.get("implementer"), id: "10"});
|
||||||
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
this.toolbar = ['Cancel',{text: this.lMap.get("stateChange"), id: "6"}];
|
this.toolbar = [];
|
||||||
if(this.selRecs[0].taskData.state == 0){
|
|
||||||
this.toolbar = [{text: this.lMap.get("stornieren"), id: "11"},{text: this.lMap.get("stateChange"), id: "6"} ,{text: this.lMap.get("implementer"), id: "10"}];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
this.toolbar = ['Cancel'];
|
|
||||||
}
|
}
|
||||||
this.selRecs = [];
|
this.selRecs = [];
|
||||||
this.selectedrecords = [];
|
this.selectedrecords = [];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue