<!-- <image [custName]="custName" [custCode]="custCode"></image>
	 <dynamic-template  [template]="shHtml" [context]="d" [modules]="moduleList"></dynamic-template>
 -->
 
<!-- <ng-container *ngTemplateOutlet="layoutProtoType == 'static' ? staticFeedTempl : dynamicTempl "></ng-container>  -->

<!-- Added by Pravin K on 30-JAN-20 START  -->
<ng-container [ngSwitch]="layoutProtoType">          
		<ng-container *ngSwitchCase="'static'">      
			<ng-container *ngTemplateOutlet="staticFeedTempl"></ng-container>
		</ng-container> 
		<ng-container *ngSwitchCase="'staticTo'">      
			<ng-container *ngTemplateOutlet="myTaskFeedTempl"></ng-container>
		</ng-container>
		<ng-container *ngSwitchDefault >
			<ng-container *ngTemplateOutlet="dynamicTempl"></ng-container>
		</ng-container>
		<!-- <ng-container *ngSwitchCase="'dynamic'">      
			<ng-container *ngTemplateOutlet="dynamicTempl"></ng-container>
		</ng-container>    -->                      
	</ng-container>  
<!-- Added by Pravin K on 30-JAN-20 END  -->	

<!-- Changed by Samruddhi for quick access panel [Start] -->
<!-- <ng-container *ngTemplateOutlet="dynamicTempl"></ng-container> -->
<ng-template #dynamicTempl>	 
	<div  class = "feed-component">
		<!-- <dynamic-template  [template]="shHtml" [context]="feedData" (onDrillDown)="_onDrillDown($event)"></dynamic-template>  -->
		<!-- <ng-container *compile="shHtml; context: feedData"></ng-container> -->
		<div class="quicklink-dashboard">
			<div class="qd-header">
			   <div class="qd-header-content">
				  <span class="icon-circle"><img src='dashboard/assets/images/{{context.image != "NA" ? context.image : "logo_company.png" }}' /></span>
				  <span class="first-line">{{context.title != 'NA' ? context.title : "Proteus Vision" }}</span>
				  <span class="second-line" [innerHTML]="context.subtitle != 'NA' ? context.subtitle : 'Simple &#149; Smart &#149; Intelligent' " ></span>
			   </div>
			</div>
			<div class="kpi-row">
			   <div *ngFor="let kpilink of context.kpilinks" >
				 <ng-container *ngTemplateOutlet=" kpiLinkTemplate; context:{ $implicit: kpilink }" ></ng-container>
			   </div>
			</div>
			<div class="quick-row">
			   <div *ngFor="let quicklink of context.quicklinks" >
				 <ng-container *ngTemplateOutlet=" quickLinkTemplate; context:{ $implicit: quicklink }" ></ng-container>
			   </div>
			</div>
		 </div>

		 <ng-template #quickLinkTemplate let-quicklink >
			 <div *ngIf="quicklink.displayLink == 'Y' " class="quick-card col quicklink" 
				 [style.background-image]="quicklink.bgImage" (click)="evalFunction(quicklink.execFunction)">
				 <div class="feedContetContainer">
					 <div *ngIf="quicklink.font_icon" class="quicklink-icon">
						<span [ngClass]="quicklink.font_icon"></span>
					 </div>
					 <div *ngIf="quicklink.image && quicklink.image.indexOf('/') == -1 " class="quicklink-icon">
						<img src='dashboard/assets/images/svg/{{quicklink.image}}' [ngClass]="evalFunction(quicklink.imageFunction)" />
					 </div>
					 <div *ngIf="quicklink.image && quicklink.image.indexOf('/') != -1 " class="quicklink-icon">
						<img src='{{quicklink.image}}' [ngClass]="evalFunction(quicklink.imageFunction)" />
					 </div> 
					 <div class="quicklink-content">
						<span class="quicklink-content-first-line">
								{{quicklink.title}}
							</span>
						<span class="quicklink-content-second-line">
								{{evalFunction(quicklink.subtitle1)}}
						</span>  
						<span class="quicklink-content-second-line">
								{{evalFunction(quicklink.subtitle2)}}
						</span>  
					 </div>
				  </div>
			 </div>
		 </ng-template>


		 <ng-template #kpiLinkTemplate let-quicklink >
			 <div class="kpi-card col kpi-box " [style.background-image]="quicklink.bgImage" (click)="evalFunction(quicklink.execFunction)">
				 <div class="kpi-header">
					 <div *ngIf="quicklink.image.indexOf('/') == -1 " class="kpi-icon">
						 <img src='dashboard/assets/images/svg/{{quicklink.image}}' [ngClass]="evalFunction(quicklink.imageFunction)" />
					 </div>
					 <div *ngIf="quicklink.image.indexOf('/') != -1 " class="kpi-icon">
						 <img src='{{quicklink.image}}' [ngClass]="evalFunction(quicklink.imageFunction)"/>
					 </div>
					 <div class="kpi-title">{{quicklink.title}}</div>
				 </div>
				 <div class="kpi-count-summary">
					 <span class="kpi-count" [ngClass]="{'no-kpi-count':evalFunction(quicklink.count) == ''}">{{evalFunction(quicklink.count)}}</span>
					 <span class="kpi-summary">{{evalFunction(quicklink.summary)}}</span>
				 </div>
			 </div>
		 </ng-template>
	</div>
</ng-template>
<!-- Changed by Samruddhi for quick access panel [End] -->

<ng-template #staticFeedTempl>
	<div style='height: 300px; overflow: auto;'>
		<div *ngFor="let _feedData of feedData;" style="padding: 0px 5px 5px 5px;">
			<ng-container *ngTemplateOutlet=" taskTemplate; context:{ 'feedData' : _feedData }"></ng-container>
		</div>
	</div>
</ng-template>
<!-- Added by Pravin K on 30-JAN-20 START  -->
<ng-template #myTaskFeedTempl>
	<div style='height: 300px; overflow: auto;'>
		<div *ngFor="let _feedData of feedData;" style="padding: 0px 5px 5px 5px;">
			<ng-container *ngTemplateOutlet=" myTaskTemplate context:{ 'feedData' : _feedData }"></ng-container>
		</div>
	</div>
</ng-template>
<!-- Added by Pravin K on 30-JAN-20 END  -->
<ng-template #taskTemplate let-feedData='feedData'>
	<div style='display: flex;align-items: center; width: 100%;'>
		<div style="width: 40px; height: 40px; float: left;">
			<div class="feed-initials" [ngStyle]=" evaluate(feedData.CURR_STATUS)">
				{{getInitials(feedData.TASK_DESCR)}}
			</div>
		</div>
		<div style='display: inline-block; font-size: 14px; padding: 1px; width: 100%;'
			title='{{feedData.TASK_DESCR}}'>
			<div class="componantTtl truncateText taskDetails">
				{{feedData.TASK_DESCR}}
			</div>
			<div class="nameDetails" > Assigned by: {{feedData.ASSIGNOR_NAME}}</div>
			<div style="font-size: 12px; color: #666;" >{{feedData.TASKDUESTR }} </div>
		</div>
		<img *ngIf="feedData.UPD_STATUS" src="dashboard/assets/images/svg/auto_sync.svg" 
		class="rotate-refresh" style=" position: relative; width: 16px; height: 16px; right: 8px;" />
		<div *ngIf="feedData.CURR_STATUS == 'P' "style='float: right;'>
			<bb-switch [name]="'CURR_STATUS'" [isRounded]="true" (bbChange)="changeCurrentStatus($event, feedData); feedData['UPD_STATUS'] = true;" ></bb-switch>
		</div>
	</div>
</ng-template>

<!-- Added by Pravin K on 30-JAN-20 START  -->
<ng-template #myTaskTemplate let-feedData='feedData'>
	<div style='display: flex;align-items: center; width: 100%;'>
		<div style="width: 40px; height: 40px; float: left;">
			<div class="feed-initials" [ngStyle]=" evaluate(feedData.CURR_STATUS)">
				{{getInitials(feedData.TASK_DESCR)}}
			</div>
		</div>
		<div style='display: inline-block; font-size: 14px; padding: 1px; width: 100%;'
			title='{{feedData.TASK_DESCR}}'>
			<div class="componantTtl truncateText taskDetails">
				{{feedData.TASK_DESCR}}
			</div>
			<div  class="nameDetails" > Assigned To: {{feedData.ASSIGNEE_NAME}}</div>
			<div style="font-size: 12px; color: #666;" >{{feedData.TASKDUESTR }} </div>
		</div>
		<img *ngIf="feedData.UPD_STATUS" src="dashboard/assets/images/svg/auto_sync.svg" 
		class="rotate-refresh" style=" position: relative; width: 16px; height: 16px; right: 8px;" />
		<!--<div *ngIf="feedData.CURR_STATUS == 'P' "style='float: right;'>
			 <span class="vision-ui-edit editBtn" (click)="openUserTask(feedData)"> </span> 
		</div> --> <!--Added by Pravin K on 01-APR-20 for Task Assign-->
	</div>
</ng-template>
<!-- Added by Pravin K on 30-JAN-20 END  -->


