Advertisement
DataCCIW

Custom Connection Request List

May 2nd, 2024
697
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {%- assign person = Context.Person -%}
  2. {% assign personId = person.Id %}
  3.  
  4. //- PastoralCare =  RSR - Pastoral Care Team
  5. {% assign isInPastoralCareRole = CurrentPerson | IsInSecurityRole: 178443 %}
  6. {% assign isInRockAdminRole = CurrentPerson | IsInSecurityRole: 2 %}
  7. {% if isInPastoralCareRole == true or isInRockAdminRole == true %}
  8.  
  9. <div class="card card-profile overflow-hidden">
  10.     <div class="card-header dflex justify-content-between"><span>Pastoral Care Requests</span><span>State</span></div>
  11. {% connectionrequest expression:'PersonAlias.PersonId  == "{{personId}}" and ConnectionOpportunityId = 11' securityenabled:'true' prefetchattributes:'Categories' %}
  12.     {% assign connectionrequestItemsSize = connectionrequestItems | Size %}
  13.     {% for connectionrequest in connectionrequestItems %}
  14.         {% connectiontype id:'{{connectionrequest.ConnectionTypeId}}' securityenabled:'false' %}
  15.         <dl class="{% cycle 'm-0 px-3 py-3 d-flex justify-content-between text-sm font-medium', 'bg-gray-100 m-0 px-3 py-3 d-flex justify-content-between text-sm font-medium' %}">
  16.             <dt class="text-gray-900">
  17.                 <a href="/page/{{connectiontype.ConnectionRequestDetailPageId}}?ConnectionRequestId={{ connectionrequest.Id }}&ConnectionOpportunityId={{ connectionrequest.ConnectionOpportunityId }}">
  18.                     {{ connectionrequest | Attribute:'Categories' }}
  19.                 </a>
  20.                 <dd class="">{% case connectionrequest.ConnectionState %}
  21.                     {% when 'Active' %}
  22.                         Active
  23.                     {% when 'Inactive' %}
  24.                         Moved to History (Inactivated)
  25.                     {% else %}
  26.                         connectionrequest.ConnectionState
  27.                     {% endcase %}
  28.                 </dd>
  29.             </dt>
  30.         </dl>
  31.         {% endconnectiontype %}
  32.     {% endfor %}
  33.     {% if connectionrequestItemsSize == 0 %}
  34.         <dt class="text-gray-900">
  35.         <dd class="">&nbsp;</dd>
  36.         </dt>
  37.     {% endif %}
  38. {% endconnectionrequest %}
  39. </div>
  40. {% endif %}
  41.  
  42. <div class="card card-profile overflow-hidden">
  43.     <div class="card-header dflex justify-content-between"><span>Connection Requests</span><span>State / Status</span></div>
  44. {% connectionrequest expression:'PersonAlias.PersonId  == "{{personId}}" and ConnectionOpportunityId <> 11' securityenabled:'true' disableattributeprefetch:'true' %}
  45.     {% assign connectionrequestItemsSize = connectionrequestItems | Size %}
  46.     {% for connectionrequest in connectionrequestItems %}
  47.    
  48.         {% connectiontype id:'{{connectionrequest.ConnectionTypeId}}' securityenabled:'false' %}
  49.  
  50.         <dl class="{% cycle 'm-0 px-3 py-3 d-flex justify-content-between text-sm font-medium', 'bg-gray-100 m-0 px-3 py-3 d-flex justify-content-between text-sm font-medium' %}">
  51.             <dt class="text-gray-900">
  52.                 <a href="/page/{{connectiontype.ConnectionRequestDetailPageId}}?ConnectionRequestId={{ connectionrequest.Id }}&ConnectionOpportunityId={{ connectionrequest.ConnectionOpportunityId }}">
  53.                     {{ connectionrequest.ConnectionOpportunity.Name }}
  54.                 </a>
  55.                 <dd class="">{{ connectionrequest.ConnectionState }} / {{ connectionrequest.ConnectionStatus }}
  56.                 </dd>
  57.             </dt>
  58.            
  59.         </dl>
  60.         {% endconnectiontype %}
  61.     {% endfor %}
  62.     {% if connectionrequestItemsSize == 0 %}
  63.         <dt class="text-gray-900">
  64.         <dd class="">&nbsp;</dd>
  65.         </dt>
  66.     {% endif %}
  67. {% endconnectionrequest %}
  68. </div>
  69.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement