[UPDT] PMS: Feedback overview empty message

This commit is contained in:
Horilla
2024-09-25 10:35:56 +05:30
parent 9df0d36dd8
commit 48c4641be9
2 changed files with 110 additions and 104 deletions

View File

@@ -83,13 +83,15 @@
<div class="align-items-center d-flex justify-content-between">
<div class="oh-profile oh-profile--md" title="Owner">
<span class="mr-2" style="font-size:15px;">{% trans "Owner: " %}</span>
<span class="oh-profile__info-label ">
<span>{% trans "Owner: " %}</span>
</span>
<div class="oh-profile__avatar mr-1">
<img src="{{feedback.employee_id.get_avatar}}" class="oh-profile__image"
alt="." />
</div>
<span class="oh-profile__name oh-text--dark">{{feedback.employee_id}}</span>
<span class="oh-profile__info-value"
>{{feedback.employee_id}}</span>
</div>
{% if perms.pms.delete_feedback or request.user|filtersubordinates %}
<div class="oh-main__titlebar oh-main__titlebar--right justify-content-end">
@@ -106,6 +108,18 @@
{% endfor %}
</select>
<div class="oh-btn-group m-2">
{% if perms.pms.change_feedback and not feedback_started %}
<div class="d-flex flex-row-reverse">
<button
data-toggle="oh-modal-toggle"
class="oh-btn oh-btn--light-bkg w-100"
data-target="#feedbackModalPopup"
hx-get="{% url 'feedback-update' id=feedback.id %}"
hx-target="#feedbackModalTarget">
<ion-icon name="create-outline" class="me-1" ></ion-icon>
</button>
</div>
{% endif %}
<form action="{% url 'feedback-archive' id=feedback.id %}" method="post" onsubmit="return confirm('{% trans "Do you want archive this Feedback ?" %}')" >
<button class="oh-btn w-100 " title="{% trans 'Archive' %}" style="background-color: white;!important">
{% csrf_token %}
@@ -124,11 +138,10 @@
</div>
{% endif %}
</div>
<div >
<div class="align-items-center d-flex">
<span class="mr-2" style="font-size:15px;">{% trans "Due on: " %}</span>
<span class="d-flex justify-content-between">{{feedback.end_date}}</span>
<span class='d-flex justify-content-between align-items-center ml-2'
<div class="align-items-center d-flex" style="min-height: 40px;">
<span class="oh-profile__info-label ">{% trans "Due on: " %}</span>
<span class="oh-profile__info-value">{{feedback.end_date}}</span>
<span class='d-flex justify-content-between align-items-center ml-1 mb-2'
>
<span title = 'due {% if feedback.end_date == today %} today {% else %}in {{feedback.end_date|sub:today}}{% endif %}'>
<ion-icon
@@ -139,8 +152,8 @@
</span>
</span>
</div>
<div class="align-items-center d-flex">
<span class="mr-2" style="font-size:15px;">{% trans "Answered employees: " %}</span>
<div class="align-items-center d-flex" style="min-height: 40px;">
<span class="oh-profile__info-label ">{% trans "Answered employees: " %}</span>
<div class="d-flex justify-content-between custom-scroll">
<div class="avatars" id="avatarsContainer">
{% for employee in employee_statics.yes %}
@@ -154,8 +167,8 @@
</div>
</div>
</div>
<div class="align-items-center d-flex">
<span class="mr-2" style="font-size:15px;" >{% trans "Employees not answerd yet: " %}</span>
<div class="align-items-center d-flex" style="min-height: 40px;">
<span class="oh-profile__info-label ">{% trans "Employees not answerd yet: " %}</span>
<div class="d-flex justify-content-between custom-scroll">
<div class="avatars" id="avatarsContainer">
{% for employee in employee_statics.no %}
@@ -170,7 +183,7 @@
</div>
</div>
</div>
<!-- checking userlevel -->
</div>
@@ -190,19 +203,7 @@
<!-- feddback answers -->
<div class="oh-tabs__content oh-tabs__content--active" id="feedback-answers">
<div class="oh-card p-4">
{% if perms.pms.change_feedback and not feedback_started %}
<div class="d-flex flex-row-reverse">
<button
class="oh-btn oh-btn--x-small d-flex align-items-center ms-2 "
data-toggle="oh-modal-toggle"
data-target="#feedbackModalPopup"
hx-get="{%url 'feedback-update' id=feedback.id %}"
hx-target="#feedbackModalTarget">
<ion-icon name="create-outline" class="me-1" ></ion-icon>
{% trans "Edit" %}
</button>
</div>
{% endif %}
<div class="row">
<div class="col-12 col-sm-12 col-md-12 col-lg-12">
<div class="m-2">

View File

@@ -16,91 +16,96 @@
</span>
</div>
<div class="oh-accordion-meta__body d-none">
<div class="oh-sticky-table oh-sticky-table--no-overflow">
<div class="oh-sticky-table">
<div class="oh-sticky-table__table oh-table--sortable">
<div class="oh-sticky-table__thead">
<div class="oh-sticky-table__tr">
<div class="oh-sticky-table__th">{% trans "Employee" %}</div>
<div class="oh-sticky-table__th">{% trans "Answer" %}</div>
</div>
</div>
<div class="oh-sticky-table__tbody">
{% for answer in answers %}
{% for key,value in answer.items %}
<div class="oh-sticky-table__tr" draggable="true">
<div class="oh-sticky-table__td">
<div class="oh-profile oh-profile--md">
<div class="oh-profile__avatar mr-1">
<img
src="{{key.get_avatar}}"
class="oh-profile__image"
alt=""
/>
</div>
<span class="oh-profile__name oh-text--dark">{{key}}</span>
</div>
</div>
<div class="oh-sticky-table__td">
{% if value.1.type == '1' %}
<span class="oh-activity-sidebar__a">{{ value.0.answer}}</span>
{% endif %}
{% if value.1.type == '2' %}
<div class="d-block mb-0">
<div class="oh-rate">
<input type="radio" id="star5" value="5" disabled {% if value.0.answer == '5' %} checked {% endif %} />
<label for="star5" title="5 Stars">5 {% trans "Stars" %}</label>
<input type="radio" id="star4" value="4" disabled {% if value.0.answer == '4' %} checked {% endif %} />
<label for="star4" title="4 Stars">4 {% trans "Stars" %}</label>
<input type="radio" id="star3" value="3" disabled {% if value.0.answer == '3' %} checked {% endif %} />
<label for="star3" title="3 Stars">3 {% trans "Stars" %}</label>
<input type="radio" id="star2" value="2" disabled {% if value.0.answer == '2' %} checked {% endif %} />
<label for="star2" title="2 Stars">2 {% trans "Stars" %}</label>
<input type="radio" id="star1" value="1" disabled {% if value.0.answer == '1' %} checked {% endif %} />
<label for="star1" title="1 Star">1 {% trans "Star" %}</label>
</div>
</div>
{% endif %}
{% if value.1.type == '3' %}
<div class="oh-input__group">
<div class="oh-input-picker-group">
<div class="oh-input-picker oh-input-picker--selected boolean-colour ">
{{value.0.answer}}
<input type="radio" selected />
</div>
</div>
</div>
{% endif %}
{% if value.1.type == '4' %}
<div class="d-block">
<label class="oh-label" for="answer1"> {{value.0.answer}}</label>
</div>
{% endif %}
{% if value.1.type == '5' %}
<div class="d-block">
<div class="oh-input-picker-group oh-input-picker-group--resp mt-2">
<div class="oh-input-picker oh-input-picker--likert likert-colour oh-input-picker--selected ">
{{value.0.answer}}
</div>
</div>
</div>
{% endif %}
</li>
</div>
{% if answers %}
<div class="oh-sticky-table oh-sticky-table--no-overflow">
<div class="oh-sticky-table">
<div class="oh-sticky-table__table oh-table--sortable">
<div class="oh-sticky-table__thead">
<div class="oh-sticky-table__tr">
<div class="oh-sticky-table__th">{% trans "Employee" %}</div>
<div class="oh-sticky-table__th">{% trans "Answer" %}</div>
</div>
{% endfor %}
</div>
<div class="oh-sticky-table__tbody">
{% for answer in answers %}
{% for key,value in answer.items %}
<div class="oh-sticky-table__tr" draggable="true">
<div class="oh-sticky-table__td">
<div class="oh-profile oh-profile--md">
<div class="oh-profile__avatar mr-1">
<img
src="{{key.get_avatar}}"
class="oh-profile__image"
alt=""
/>
</div>
<span class="oh-profile__name oh-text--dark">{{key}}</span>
</div>
</div>
<div class="oh-sticky-table__td">
{% if value.1.type == '1' %}
<span class="oh-activity-sidebar__a">{{ value.0.answer}}</span>
{% endif %}
{% endfor %}
{% if value.1.type == '2' %}
<div class="d-block mb-0">
<div class="oh-rate">
<input type="radio" id="star5" value="5" disabled {% if value.0.answer == '5' %} checked {% endif %} />
<label for="star5" title="5 Stars">5 {% trans "Stars" %}</label>
<input type="radio" id="star4" value="4" disabled {% if value.0.answer == '4' %} checked {% endif %} />
<label for="star4" title="4 Stars">4 {% trans "Stars" %}</label>
<input type="radio" id="star3" value="3" disabled {% if value.0.answer == '3' %} checked {% endif %} />
<label for="star3" title="3 Stars">3 {% trans "Stars" %}</label>
<input type="radio" id="star2" value="2" disabled {% if value.0.answer == '2' %} checked {% endif %} />
<label for="star2" title="2 Stars">2 {% trans "Stars" %}</label>
<input type="radio" id="star1" value="1" disabled {% if value.0.answer == '1' %} checked {% endif %} />
<label for="star1" title="1 Star">1 {% trans "Star" %}</label>
</div>
</div>
{% endif %}
{% if value.1.type == '3' %}
<div class="oh-input__group">
<div class="oh-input-picker-group">
<div class="oh-input-picker oh-input-picker--selected boolean-colour ">
{{value.0.answer}}
<input type="radio" selected />
</div>
</div>
</div>
{% endif %}
{% if value.1.type == '4' %}
<div class="d-block">
<label class="oh-label" for="answer1"> {{value.0.answer}}</label>
</div>
{% endif %}
{% if value.1.type == '5' %}
<div class="d-block">
<div class="oh-input-picker-group oh-input-picker-group--resp mt-2">
<div class="oh-input-picker oh-input-picker--likert likert-colour oh-input-picker--selected ">
{{value.0.answer}}
</div>
</div>
</div>
{% endif %}
</li>
</div>
</div>
{% endfor %}
{% endfor %}
</div>
</div>
</div>
</div>
</div>
{% else %}
<h5 class="oh-404__subtitle">{% trans "No answers yet." %}</h5>
{% endif %}
</div>
</div>
{% endfor %}
</div>