Remove "Project Time Category" from Time Sheet Portal

Tammy Holland2
Kilo Explorer

We are in the process of upgrading from Jakarta to London, and the new Time Sheet Portal has a newly exposed field called "Project Time Category" (or it was previously removed from the Jakarta Worker Portal manually). I have a requirement to remove this field, but I am not sure the best way to approach it. I have tried removing reference from the client controller on the Time Card Portal - Task Selector widget with no effect. Any assistance would be greatly appreciated!

3 REPLIES 3

nthumma
Giga Guru

You can hide it by going to 'Time Card Grid' widget (ID - tc-grid) 

In server-side code, un-comment line 28 and comment line 29

	data.fields = ['task.number', 'task.short_description'];
	//data.fields = ['task.short_description', 'project_time_category']

 

FYI - I don't know if hiding 'Project Time Category' causes any other issues, Please test it before making changes in PROD.

Sayah Jihade
Kilo Explorer

Hello Tammy,

 

I also need to remove the project time category field from the time sheet portal, I want to know if you have test what Nthumma proposed and if there is any impact?

 

Regards,

Sayah

I know this thread is old, but the proposed solution is no longer valid in the Orlando version.

Our need was to completely eliminate the 2 columns, "Project time category" and "Resource plan", so the simple fix was to go into the widget "Time Card Grid" (tc-grid), as mentioned above by @nthumma , and add:

ng-if="data.column_meta[field].label != 'Project time category' && data.column_meta[field].label != 'Resource plan'"

in 2 places.

 

[1]

Find:

<div scope="col" ng-repeat="field in ::data.fields track by $index" class="flex-item {{field}}" ng-class="{'selected':data.highlightedField == field}"

Replace with:

<div scope="col" ng-repeat="field in ::data.fields track by $index" class="flex-item {{field}}" ng-class="{'selected':data.highlightedField == field}" ng-if="data.column_meta[field].label != 'Project time category' && data.column_meta[field].label != 'Resource plan'"

 

[2]

Find:

ng-class="{'selected':data.highlightedField == field}" role="cell" ng-style="{{::getWidth(field)}}"

Replace with:

ng-class="{'selected':data.highlightedField == field}" role="cell" ng-style="{{::getWidth(field)}}" ng-if="data.column_meta[field].label != 'Project time category' && data.column_meta[field].label != 'Resource plan'"

 

End result:

find_real_file.png