@using PantheonRA.BackOffice.Enums
@model string

<div class="form-group">
    <label class="control-label">@Loc.MasterData</label>
    <select id="employeesCodelist" class="form-control custom-select" onchange="onChangeEmployeeCodelist()">
        <option @(Model == EmployeeCodelistType.Jobs ? "selected" : string.Empty) data-url="@Url.Action("Index", "Jobs")">@Loc.Jobs</option>
        <option @(Model == EmployeeCodelistType.DailyAllows ? "selected" : string.Empty) data-url="@Url.Action("Index", "DailyWages")">@Loc.DailyAllowsAndMileage</option>
    </select>
</div>

<script>
    function onChangeEmployeeCodelist() {
        window.location = $("#employeesCodelist option:selected").attr("data-url");
    }
</script>