Disable "Submit time sheet" button from Time sheet portal

VARUN37
Tera Expert

How can we disable the "submit time sheet" button from the timesheet portal? The client wants the users to enable only the "submit" button on the top. 

 

 

VARUN37_1-1721062396236.png

 

 

3 REPLIES 3

AnirudhKumar
Mega Sage

Hey Varun,

I guess you may have already figured this one out. But here's the answer if you still need it...

The code is present in the widget called Time Card Grid.

This widget has a Angular ng-Template called tcMoreActions, which is where the 'Submit time card' option is listed.

Comment the code along with the <li> tag, and the option will disappear on portal.

Hi Anirudh

 

I figured. And also your comment helped me! Thanks for that! 

 

Just a brief:

Step 1: Go to the "time card grid" widget

Step 2: Check for "Angular ng-templates" related list

Step 3: Find this line of code -

<li class="item" ng-if="item.canSubmit" ng-click="updateRecordState($event, 'Submitted')">
<a href="javascript&colon;void(0);">${Submit Time Card}</a>
</li>

Step 4: Comment the following line like this:

 

<!--
<li class="item" ng-if="item.canSubmit" ng-click="updateRecordState($event, 'Submitted')">
<a href="javascript&colon;void(0);">${Submit Time Card}</a>
</li>
-->

 

 

That worked for me

Well then, would you mark my answer correct please 🤑