admin: improve claims with menu
This commit is contained in:
parent
9186bbc229
commit
6f64eaed95
3 changed files with 32 additions and 11 deletions
|
|
@ -60,7 +60,7 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="a in assignees" ng-click="edit(a)">
|
||||
<tr ng-repeat="a in assignees" ng-click="edit(a)" ng-if="a.id !== 0">
|
||||
<td>
|
||||
{{ a.id }}
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,13 @@
|
|||
<div class="float-right btn-group ml-1" role="group" ng-if="claim.id">
|
||||
<button class="btn btn-secondary" ng-if="claim.state != 'new'" ng-click="changeState('new')"><span class="glyphicon glyphicon-repeat" aria-hidden="true"></span> Nouveau</button>
|
||||
<button class="btn btn-warning" ng-if="claim.state != 'need-info' && (claim.state == 'new' || claim.state == 'confirmed' || claim.state == 'in-progress')" ng-click="changeState('need-info')"><span class="glyphicon glyphicon-question-sign" aria-hidden="true"></span> Besoin d'infos</button>
|
||||
<button class="btn btn-danger" ng-if="claim.state != 'confirmed'" ng-click="changeState('confirmed')"><span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Confirmer</button>
|
||||
<button class="btn btn-info" ng-if="claim.state != 'in-progress' && (claim.state == 'need-info' || claim.state == 'confirmed' || claim.state == 'need-review')" ng-click="changeState('in-progress')"><span class="glyphicon glyphicon-hourglass" aria-hidden="true"></span> En cours</button>
|
||||
<button class="btn btn-success" ng-if="claim.state != 'need-review' && (claim.state == 'in-progress' || claim.state == 'confirmed' || claim.state == 'need-info')" ng-click="changeState('need-review')"><span class="glyphicon glyphicon-saved" aria-hidden="true"></span> Fait</button>
|
||||
<button class="btn btn-success" ng-if="claim.state != 'closed' && claim.state == 'need-review'" ng-click="changeState('closed')"><span class="glyphicon glyphicon-thumbs-down" aria-hidden="true"></span> Clore</button>
|
||||
<button class="btn btn-dark" ng-if="claim.state != 'invalid' && (claim.state == 'new' || claim.state == 'need-info')" ng-click="changeState('invalid')"><span class="glyphicon glyphicon-save" aria-hidden="true"></span> Invalide</button>
|
||||
</div>
|
||||
<button class="float-right btn btn-primary" ng-if="claim.id && whoami && whoami != claim.id_assignee" ng-click="assignToMe()">Me l'assigner</button>
|
||||
<h2>Tâche</h2>
|
||||
|
||||
<form ng-submit="saveClaim()" class="row">
|
||||
|
|
@ -31,7 +41,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right" ng-show="claim.id">
|
||||
<div class="text-right mb-3" ng-show="claim.id">
|
||||
<button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-save" aria-hidden="true"></span> Save</button>
|
||||
<button type="button" class="btn btn-danger" ng-click="deleteClaim()"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Delete</button>
|
||||
</div>
|
||||
|
|
@ -52,8 +62,8 @@
|
|||
</div>
|
||||
|
||||
<div ng-repeat="description in claim.descriptions | orderBy:'id':true" class="alert" ng-class="{'alert-info': '' + description.id_assignee != whoami, 'alert-dark': '' + description.id_assignee == whoami}">
|
||||
<strong>Par <em ng-if="!description.id_assignee">anonymous</em> <span ng-repeat="assignee in assignees" ng-if="assignee.id == description.id_assignee">{{ assignee.name }}</span> le {{ description.date | date:"mediumTime" }} :</strong>
|
||||
{{ description.content }}
|
||||
<strong>Par <span ng-repeat="assignee in assignees" ng-if="assignee.id == description.id_assignee">{{ assignee.name }}</span> le {{ description.date | date:"mediumTime" }} :</strong>
|
||||
<span style="white-space: pre-line">{{ description.content }}</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
Reference in a new issue