소스 검색

fix attendies

master
Daniel 3 년 전
부모
커밋
81e47926ac
5개의 변경된 파일12개의 추가작업 그리고 10개의 파일을 삭제
  1. +5
    -4
      src/client/app/js/app/model/Appointment.js
  2. +1
    -1
      src/client/app/tmpl/appointment-detail-attendee-row.html
  3. +1
    -1
      src/client/app/tmpl/appointment-detail-attendee.html
  4. +4
    -4
      src/client/app/tmpl/appointment-edit-attendee-row.html
  5. +1
    -0
      src/server/server/control/TB_Server_Control_Appointment.php

+ 5
- 4
src/client/app/js/app/model/Appointment.js 파일 보기

@@ -520,7 +520,7 @@ app.model.Appointment = function( appData, attendees, attendeeProfiles )
{
if ( attendees[ ai ].has_attended == "attended" )
{
attendeesAttended.push( attendees[ ai ].profile_id );
attendeesAttended.push( attendees[ ai ]);
}
}
@@ -537,7 +537,8 @@ app.model.Appointment = function( appData, attendees, attendeeProfiles )
attendees[ ai ].has_attended == "declined" )
{
//attendeesNotAttended.push( this.getProfileById( attendees[ ai ].profile_id ) );
attendeesNotAttended.push( attendees[ ai ].profile_id );
//attendeesNotAttended.push( attendees[ ai ].profile_id );
attendeesNotAttended.push( attendees[ ai ] );
}
}
@@ -637,13 +638,13 @@ app.model.Appointment = function( appData, attendees, attendeeProfiles )
* @param profileId
* @returns {*}
*/
this.getAttendeeHasAttendedValueForProfileId = function( profileId )
this.getAttendeeHasAttendedValueForProfileId = function( profileId, profileChildId = null )
{
var ha = null;
for ( var ai = 0; ai < attendees.length; ai++ )
{
if ( attendees[ ai ].profile_id == profileId )
if ( attendees[ ai ].profile_id == profileId && profileChildId == attendees[ ai ].profile_child_id )
{
ha = attendees[ ai ].has_attended;
break;


+ 1
- 1
src/client/app/tmpl/appointment-detail-attendee-row.html 파일 보기

@@ -16,7 +16,7 @@
<div class="appointment-original-status">
<small>
<%= _lc( 'ATTENDANCE' ) %>
<% if ( 'accepted' === a.getAttendeeStatusForProfileId( at.getId() ) ) { %>
<% if ( 'accepted' === a.getAttendeeStatusForProfileId( at.getId(), childProfile ? childProfile.id : null ) ) { %>
(<%= _lc( 'WITH_ACCEPTED_FEEDBACK' ) %>)
<% } else { %>
(<%= _lc( 'WITHOUT_ACCEPTED_FEEDBACK' ) %>)


+ 1
- 1
src/client/app/tmpl/appointment-detail-attendee.html 파일 보기

@@ -20,7 +20,7 @@
<table class="table table-profiles">
<tbody>
<% for ( var aai = 0; aai < attendeesAttended.length; aai++ ) { %>
<% prfl = a.getProfileById( attendeesAttended[ aai ] ); %>
<% prfl = a.getProfileById( attendeesAttended[ aai ].profile_id ); %>
<%=raw app.core.View.getTemplate( 'appointment-detail-attendee-row', { a: a, at :prfl, g : g, childProfile : prfl.getChildProfileById( attendeesAttended[ aai ].profile_child_id ) } ) %>
<% } %>
</tbody>


+ 4
- 4
src/client/app/tmpl/appointment-edit-attendee-row.html 파일 보기

@@ -46,17 +46,17 @@
<td class="text-center">
<div class="custom-control custom-checkbox">
<input type="checkbox"
id="attendee-final-status-<%= attendee.getId() %>"
id="attendee-final-status-<%= attendee.getId() %><%= childProfile ? '-' + childProfile.id : '' %>"
data-type="checkbox-attendee-final-status"
data-appointment-id="<%= a.getId() %>"
data-profile-id="<%= attendee.getId() %>"
data-child-profile-id="<%= childProfile ? childProfile.id : '0' %>"
data-orig-status="<%= a.hasProfileIdAttended( attendee.getId() ) ? 'checked' : 'not-checked' %>"
data-orig-status="<%= a.hasProfileIdAttended( attendee.getId(), childProfile ? childProfile.id : null ) ? 'checked' : 'not-checked' %>"
class="custom-control-input"
<%= a.hasProfileIdAttended( attendee.getId() ) ? 'checked="checked"' : '' %>
<%= a.hasProfileIdAttended( attendee.getId(), childProfile ? childProfile.id : null ) ? 'checked="checked"' : '' %>
/>
<label class="custom-control-label"
for="attendee-final-status-<%= attendee.getId() %>"
for="attendee-final-status-<%= attendee.getId() %><%= childProfile ? '-' + childProfile.id : '' %>"
style="vertical-align: top;"></label>
</div>
</td>


+ 1
- 0
src/server/server/control/TB_Server_Control_Appointment.php 파일 보기

@@ -1126,6 +1126,7 @@ class TB_Server_Control_Appointment {
$attendee = new TB_Shared_Ent_TeamData_Attendee();
$attendee->appointment_id = $appointment->id;
$attendee->profile_id = $profileToUpdate->id;
$attendee->status = TB_Shared_Ent_TeamData_Attendee::STATUS_DECLINED;
if ( $profileChildId > 0 )
{
$attendee->profile_child_id = $profileChildId;


불러오는 중...
취소
저장