Documentation
parent
5f38657a9e
commit
01e2d10fc7
|
|
@ -302,26 +302,20 @@ export class NttGanttComponent implements OnInit {
|
||||||
|
|
||||||
/**############################### NTT Gantt Component Helper Functions /**###############################*/
|
/**############################### NTT Gantt Component Helper Functions /**###############################*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The function languageChange executes a language change in the language service and triggers the initLanguage function.
|
||||||
|
* This function is triggered by a manual language of the user.
|
||||||
|
*/
|
||||||
public languageChange(args: any){
|
public languageChange(args: any){
|
||||||
this.languageService.languageChange(args.value),
|
this.languageService.languageChange(args.value),
|
||||||
this.initLanguge();
|
this.initLanguge();
|
||||||
}
|
}
|
||||||
|
|
||||||
public changeScalar(){
|
/**
|
||||||
if(this.selectedScalar == this.scalars[0]){
|
* The function initLanguge executes a language change for the ntt gantt component. Therefore the time scalar and the gantt columns get the corresponding values determined by the selected language.
|
||||||
this.timelineSettings = {topTier: {unit: 'Week'}, bottomTier: {format: 'dd', unit: 'Day', count: 1}};
|
* This function is triggered by the ngOnInit function or the languageChange function
|
||||||
this.renderplanTime = false;
|
* @param initial determines if the function is initially trigger by the ngOnInit function, in all other cases the gantt chart should be refrehed
|
||||||
}
|
*/
|
||||||
if(this.selectedScalar == this.scalars[1]){
|
|
||||||
this.timelineSettings = {topTier: {unit: 'Month'}, bottomTier: {format: 'WW', unit: 'Week', count: 1}};
|
|
||||||
this.renderplanTime = true;
|
|
||||||
}
|
|
||||||
if(this.selectedScalar == this.scalars[2]){
|
|
||||||
this.timelineSettings = {topTier: {unit: 'Year'}, bottomTier: {format: 'MM',unit: 'Month',count: 1}};
|
|
||||||
this.renderplanTime = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
initLanguge(initial: boolean = false){
|
initLanguge(initial: boolean = false){
|
||||||
|
|
||||||
if(this.languageService.language == 'DE'){
|
if(this.languageService.language == 'DE'){
|
||||||
|
|
@ -339,6 +333,24 @@ export class NttGanttComponent implements OnInit {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The function changeScalar executes a change of the displayed time scalar.
|
||||||
|
* This function is triggered if the user changes the time scalar.
|
||||||
|
*/
|
||||||
|
public changeScalar(){
|
||||||
|
if(this.selectedScalar == this.scalars[0]){
|
||||||
|
this.timelineSettings = {topTier: {unit: 'Week'}, bottomTier: {format: 'dd', unit: 'Day', count: 1}};
|
||||||
|
this.renderplanTime = false;
|
||||||
|
}
|
||||||
|
if(this.selectedScalar == this.scalars[1]){
|
||||||
|
this.timelineSettings = {topTier: {unit: 'Month'}, bottomTier: {format: 'WW', unit: 'Week', count: 1}};
|
||||||
|
this.renderplanTime = true;
|
||||||
|
}
|
||||||
|
if(this.selectedScalar == this.scalars[2]){
|
||||||
|
this.timelineSettings = {topTier: {unit: 'Year'}, bottomTier: {format: 'MM',unit: 'Month',count: 1}};
|
||||||
|
this.renderplanTime = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**############################### NTT Gantt Component EVENTS /**###############################*/
|
/**############################### NTT Gantt Component EVENTS /**###############################*/
|
||||||
|
|
||||||
|
|
@ -477,6 +489,7 @@ export class NttGanttComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**############################### Syncfusion Framework EVENTS /**###############################*/
|
/**############################### Syncfusion Framework EVENTS /**###############################*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The function queryTaskbarInfo catches the corresponding syncfsuions event and colors the respective diamond depending on the status
|
* The function queryTaskbarInfo catches the corresponding syncfsuions event and colors the respective diamond depending on the status
|
||||||
* @param args event arguments from the syncfusion gantt chart
|
* @param args event arguments from the syncfusion gantt chart
|
||||||
|
|
@ -520,9 +533,9 @@ export class NttGanttComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The function taskbarEdited catches the corresponding syncfsuions event and cancels the user action if the isFixed flag of a task (Date) is set true
|
* The function taskbarEdited catches the corresponding syncfsuions event and cancels the user action if the isFixed flag of a task (Date) is set true.
|
||||||
* If the isFixed flag is false, it triggers the dataService to update the moved date
|
* If the isFixed flag is false, it triggers the dataService to update the moved date.
|
||||||
* @param args event arguments from the syncfusion gantt chart
|
* @param args event arguments from the syncfusion gantt chart.
|
||||||
*/
|
*/
|
||||||
public taskbarEdited(args: any){
|
public taskbarEdited(args: any){
|
||||||
if(args.data.taskData.isFixed !== false ) {
|
if(args.data.taskData.isFixed !== false ) {
|
||||||
|
|
@ -541,8 +554,8 @@ export class NttGanttComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The function taskbarEditing catches the corresponding syncfsuions event and cancels the user action if the isFixed flag of a task (Date) is set true
|
* The function taskbarEditing catches the corresponding syncfsuions event and cancels the user action if the isFixed flag of a task (Date) is set true.
|
||||||
* @param args event arguments from the syncfusion gantt chart
|
* @param args event arguments from the syncfusion gantt chart.
|
||||||
*/
|
*/
|
||||||
public taskbarEditing(args: any) {
|
public taskbarEditing(args: any) {
|
||||||
if(args.data.taskData.isFixed !== false ) {
|
if(args.data.taskData.isFixed !== false ) {
|
||||||
|
|
@ -550,6 +563,10 @@ export class NttGanttComponent implements OnInit {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The function taskbarEditing catches the corresponding syncfsuions event and executes a query operation to synchronize the scrollbars of the main gannt chart and the planTimeBart gantt chart.
|
||||||
|
* @param args event arguments from the syncfusion gantt chart.
|
||||||
|
*/
|
||||||
public actionComplete(args: any){
|
public actionComplete(args: any){
|
||||||
if (args.action === 'HorizontalScroll') {
|
if (args.action === 'HorizontalScroll') {
|
||||||
let elem = document.querySelector(
|
let elem = document.querySelector(
|
||||||
|
|
@ -561,24 +578,24 @@ export class NttGanttComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The function load catches the corresponding syncfsuions event and triggers the loading spinner to start while the gantt chart is refrehshing
|
* The function load catches the corresponding syncfsuions event and triggers the loading spinner to start while the gantt chart is refrehshing.
|
||||||
* @param args event arguments from the syncfusion gantt chart
|
* @param args event arguments from the syncfusion gantt chart.
|
||||||
*/
|
*/
|
||||||
public load(args: any) {
|
public load(args: any) {
|
||||||
this.spin = true;
|
this.spin = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The function dataBound catches the corresponding syncfsuions event and stops the loading spinner
|
* The function dataBound catches the corresponding syncfsuions event and stops the loading spinner.
|
||||||
* @param args event arguments from the syncfusion gantt chart
|
* @param args event arguments from the syncfusion gantt chart.
|
||||||
*/
|
*/
|
||||||
public dataBound(args: any) {
|
public dataBound(args: any) {
|
||||||
this.spin = false;
|
this.spin = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The function created catches the corresponding syncfsuions event and stops the internal loading spinner
|
* The function created catches the corresponding syncfsuions event and stops the internal loading spinner.
|
||||||
* @param args event arguments from the syncfusion gantt chart
|
* @param args event arguments from the syncfusion gantt chart.
|
||||||
*/
|
*/
|
||||||
public created(args: any) {
|
public created(args: any) {
|
||||||
this.ganttDefault.hideSpinner();
|
this.ganttDefault.hideSpinner();
|
||||||
|
|
@ -586,16 +603,26 @@ export class NttGanttComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The function onExpand catches the corresponding syncfsuions event and avoids a chart row from beeing expanded by the user
|
* The function onExpand catches the corresponding syncfsuions event and avoids a chart row from beeing expanded by the user.
|
||||||
* @param args event arguments from the syncfusion gantt chart
|
* @param args event arguments from the syncfusion gantt chart.
|
||||||
*/
|
*/
|
||||||
public onExpand(args: any){
|
public onExpand(args: any){
|
||||||
args.cancel = true;
|
args.cancel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The function onResizing catches the corresponding syncfsuions event and stores the actual splitter postition to synchronize the splitters of the main gannt chart and the planTimeBart gantt chart.
|
||||||
|
* @param args event arguments from the syncfusion gantt chart.
|
||||||
|
*/
|
||||||
public onResizing(args){
|
public onResizing(args){
|
||||||
let width = '' + args.paneSize[0]+'px';
|
let width = '' + args.paneSize[0]+'px';
|
||||||
this.splitterSettings = {position: width};
|
this.splitterSettings = {position: width};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The function actionBegin catches the corresponding syncfsuions event applies a sort by the selected column and refrehses the gantt chart or opens the Change Package direktly in Remedy if the user doubleclicks on a main date.
|
||||||
|
* @param args event arguments from the syncfusion gantt chart.
|
||||||
|
*/
|
||||||
public actionBegin(args: any) {
|
public actionBegin(args: any) {
|
||||||
if(args.dialogModel){
|
if(args.dialogModel){
|
||||||
args.cancel = true;
|
args.cancel = true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue