package mastermenuusergrouptryandy

import (
	"cpone/models"
	"cpone/layout"
)

templ ListMasterUserGroupInitial(data []models.UserGroupV1) {
	<table>
		<thead>
			<tr>
				<th>No.</th>
				<th>M_UserGroupCode</th>
				<th>M_UserGroupName</th>
				<th>M_UserGroupCreated</th>
				<th>M_UserGroupLastUpdated</th>
				<th>M_UserGroupIsActive</th>
			</tr>
		</thead>
		<tbody>
			if len(data) == 0 {
				<td colspan="5">Tidak ada data</td>
			} else {
				for _, d := range data {
					<tr>
						<td>{ d.Nomor }</td>
						<td>{ d.M_UserGroupCode }</td>
						<td>{ d.M_UserGroupName }</td>
						<td>{ d.M_UserGroupCreated }</td>
						<td>{ d.M_UserGroupLastUpdated }</td>
						<td>{ d.M_UserGroupIsActive }</td>
					</tr>
				}
			}
		</tbody>
	</table>
}

templ JsMasterMenuUserGroupV1() {
}

templ CssMasterMenuUserGroupV1() {
}

templ ShowMasterMenuUserGroupV1(title string, cmp templ.Component, css templ.Component, js templ.Component) {
	@layout.PlaygroundLayout(title, css, js) {
		@cmp
	}
}
