<!DOCTYPE html>
<html lang="ko"
	  xmlns:th="http://www.thymeleaf.org">
<!--
 *******************************************************************************
 * @source  : CouponPubCustListPopupForm.html
 * @desc    : 쿠폰 발급받은 회원리스트 팝업 화면
 *============================================================================
 * ISTYLE24
 * Copyright(C) 2020 TSIT, All rights reserved.
 *============================================================================
 * VER  DATE         AUTHOR      DESCRIPTION
 * ===  ===========  ==========  =============================================
 * 1.0  2021.02.03   bin2107       최초 작성
 *******************************************************************************
 -->
<div class="modalPopup" data-width="960" data-height="500" >
	<div class="panelStyle" >
		<div class="panelTitle">
			<h2>쿠폰 발급받은 회원</h2>
			<button type="button" class="close" onclick="uifnPopupClose('CpnPubCustListPopup')"><i class="fa fa-times"></i></button>
		</div>
		<div class="panelContent">
			<div id="pubCustgridList" style="width:100%; height:420px;" class="ag-theme-balham"></div>
		</div>
	</div>
</div>
<script th:inline="javascript">
	/*<![CDATA[*/
	var cpnPubCustList = [[${cpnPubCustList}]]; //gagajf.convertToArray([[${cpnPubCustList}]]);

	var columnDefs = [
		{ headerName: "회원번호" , field:"custNo" , width:100, cellClass:"text-center"} ,
		{ headerName: "회원명", field:'maskingCustNm', width:100, cellClass: 'text-center'},
		{ headerName: "회원구분" , field:"custGbNm" , width:120, cellClass:"text-center" } ,
		{ headerName: "회원등급" , field:"custGradeNm" , width:120, cellClass:"text-center" } ,
		{ headerName: "시작유효기간" , field:"availStdt" , width:150, cellClass:"text-center"
			,valueGetter	: function (params) {
				return gagaAgGrid.toDateTimeFormat(params.data.availStdt);
			}
		} ,
		{ headerName: "종료유효기간" , field:"availEddt" , width:150, cellClass:"text-center"
			,valueGetter	: function (params) {
				return gagaAgGrid.toDateTimeFormat(params.data.availEddt);
			}
		} ,
		{ headerName: "사용여부" , field:"useYn" , width:120, cellClass:"text-center" } ,
		/*{ headerName: "사용일" , field:"usedDt" , width:150, cellClass:"text-center"
			,valueGetter	: function (params) {
				return gagaAgGrid.toDateTimeFormat(params.data.usedDt);
			}
		} ,*/
		{ headerName: "발급사유" , field:"pubReasonNm" , width:200, cellClass:"text-center"} ,
		{ headerName: "발급상세사유" , field:"pubReasonDtl" , width:200, cellClass:"text-center"} ,
		{ headerName: "발급인ID" , field:"regNo" , width:100, cellClass:"text-center"} ,
		{ headerName: "발급인" , field:"regNm" , width:100, cellClass:"text-center"} ,
		{ headerName: "발급시간" , field:"regDt" , width:150, cellClass:"text-center"
			,valueGetter	: function (params) {
				return gagaAgGrid.toDateTimeFormat(params.data.regDt);
			}
		}
	];

	let pubCustGridOptions = gagaAgGrid.getGridOptions(columnDefs);

	$(document).ready(function(){
		gagaAgGrid.createGrid('pubCustgridList', pubCustGridOptions);
		pubCustGridOptions.api.setRowData(cpnPubCustList);
	});

	/*]]>*/
</script>
</html>