Skip to content

Commit

Permalink
PCHR-2395: Amend templates
Browse files Browse the repository at this point in the history
  • Loading branch information
igorpavlov committed Jul 13, 2017
1 parent a0292a0 commit df49841
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
<div class="button-container">
<leave-request-create-dropdown
btn-class="btn-primary"
contact-id="myleave.contactId">
contact-id="myleave.contactId"
selected-contact-id="myleave.contactId"
is-self-record="true">
</leave-request-create-dropdown>
</div>
<div class="tabs-container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
href="#"
leave-request-popup leave-type="{{option.type}}"
contact-id="vm.contactId"
selected-contact-id="vm.selectedContactId">
selected-contact-id="vm.selectedContactId"
is-self-record="vm.isSelfRecord">
<i class="fa fa-{{option.icon}}" aria-hidden="true"></i> {{option.label}}
</a>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ <h2 class="panel-title">{{calendar.monthLabels[month.month] + " " + month.year}}
<a ng-if="day.leaveRequest"
contact-id="calendar.contactId"
selected-contact-id="$root.settings.contactId"
is-self-record="true"
leave-request-popup
leave-request="day.leaveRequest"
title="Click to open this leave request">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@
ng-switch-when="true"
leave-request-popup
leave-request="request"
contact-id="report.contactId">
contact-id="report.contactId"
is-self-record="true">
{{action}}
</a>
<a href ng-switch-default ng-click="report.action(request, action)">
Expand Down Expand Up @@ -398,7 +399,8 @@
ng-switch-when="true"
leave-request-popup
leave-request="request"
contact-id="report.contactId">
contact-id="report.contactId"
is-self-record="true">
{{action}}
</a>
<a href ng-switch-default ng-click="report.action(request, action)">
Expand Down Expand Up @@ -500,7 +502,8 @@
ng-switch-when="true"
leave-request-popup
leave-request="request"
contact-id="report.contactId">
contact-id="report.contactId"
is-self-record="true">
{{action}}
</a>
<a href ng-switch-default ng-click="report.action(request, action)">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@
<div class="col-xs-4">
<span
class="chr_leave-request-modal__span-expiry"
ng-if="!$ctrl.canManage">
ng-if="!$ctrl.canManage || $ctrl.isSelfRecord">
{{$ctrl.request.toil_expiry_date | date: $ctrl.uiOptions.userDateFormat}}
</span>
<div ng-if="$ctrl.canManage" class="input-group">
<div ng-if="$ctrl.canManage && !$ctrl.isSelfRecord" class="input-group">
<input
type="text"
class="form-control"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</button>
<a
class="text-danger pull-left pointer chr_leave-request-modal__delete"
ng-if="$ctrl.isRole('admin') && $ctrl.directiveOptions.leaveRequest.id"
ng-if="$ctrl.isRole('admin') && $ctrl.directiveOptions.leaveRequest.id && !$ctrl.isSelfRecord"
ng-click="$ctrl.deleteLeaveRequest()">
<i class="fa fa-trash-o" aria-hidden="true"></i> Delete
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

<crm-loading show="!$ctrl.loading.absenceTypes">
<div
ng-show="$ctrl.canManage && !$ctrl.isMode('create')"
ng-show="$ctrl.canManage && !$ctrl.isMode('create') && !$ctrl.isSelfRecord"
class="row chr_leave-request-modal__user-info">
<span class="col-xs-6">{{$ctrl.contactName}}</span>
<span class="col-xs-6">{{::$ctrl.getStatusFromValue($ctrl.request.status_id).label}}</span>
</div>
<!-- ng-show is required in model as it was not showing the list of managees for ui-select-choices-->
<div class="modal-body chr_leave-request-modal__form">
<div ng-show="$ctrl.canManage && !$ctrl.isMode('edit')">
<div class="modal-body chr_leave-request-modal__form" ng-if="!$ctrl.loading.absenceTypes">
<div ng-show="$ctrl.canManage && !$ctrl.isMode('edit') && !$ctrl.isSelfRecord">
<ui-select
autofocus
ng-model="$ctrl.request.contact_id"
Expand Down Expand Up @@ -74,7 +74,7 @@
</div>
</div>
<div
ng-show="$ctrl.canManage"
ng-show="$ctrl.canManage && !$ctrl.isSelfRecord"
class="row chr_leave-request-modal__response">
<div class="col-xs-12 form-horizontal">
<div class="form-group">
Expand Down

0 comments on commit df49841

Please sign in to comment.