-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMgtTypes.html
103 lines (95 loc) · 3.08 KB
/
MgtTypes.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<div class="container-fluid glass" style="margin: 8px 0px 0px 0px">
<div class="row">
<div class="col-6">
<h1 class="text-center text-uppercase">Manage <span class="typeName text-white"></span></h1>
</div>
</div>
<div class="row">
<div class="col-6">
<div class="card text-bg-primary">
<div class="card-body">
<div class="card-header">
<h5 class="fs-4">Add New <span class="typeName"></span></h5>
</div>
<div id="cfsFrm"></div>
</div>
</div>
</div>
<div class="col-6">
<div class="input-group mb-0">
<div class="btn-group" role="group" aria-label="Basic example">
<button type="button" class="btn btn-primary">Middle</button>
<button type="button" class="btn btn-primary">Right</button>
</div>
</div>
<div class="card">
<div class="card-body">
<h5 class="card-title"><span class="typeName"></span></h5>
<ul id="displayInfo" class="list-group"></ul>
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function () {
var type = $("#LoadContent").data("type");
$(".typeName").text(type);
console.log(type)
if(type == 'Vendor'){
loadData(type)
}else if(type == 'Fund'){
loadData(type)
}else if(type == 'Category'){
loadData(type)
}else if(type == 'Pool'){
loadData(type)
} else if(type == 'CFS'){
$('#DEPTID, #FUND,#PC_BU,#PROJECT_ID,#ACTIVITY_CODE').on('keyup', function(){
createCfsDisplay();
});
$('#FUND_GROUP, #FUND_TYPE').on('change', function(){
createCfsDisplay();
});
loadData(type)
} else{
loadData(type)
}
//loadData(type);
});
function loadData(type) {
var frm = '';
frm += '<div class="row">';
frm += '<div class="col-md">';
frm += '<input type="text" class="form-control" id="CFS" placeholder="Chartfield String" aria-label="CFS">';
frm += '</div>';
frm += '<div class="col-md-2">';
frm += '<input type="text" class="form-control" id="PRIMARY_BALANCE" placeholder="Primary Balance" aria-label="PRIMARY BALANCE">';
frm += '</div>';
frm += '<div class="col-md-2 d-block align-content-center">';
frm += '<button class="btn btn-primary" ><i class="fas fa-save"></i> Save</button>';
frm += '</div>';
frm += '</div>';
frm += '<div class="row mt-2">';
frm += '<div class="col-md-12">';
frm += '<textarea class="form-control" id="CFS_DESC" rows="3" placeholder="Description"></textarea>';
frm += '</div>';
frm += '</div>';
$("#cfsFrm").html(frm);
$.ajax({
url: "assets/CFCs/functions.cfc",
type: "GET",
dataType: "json",
data: { method: "get" + type }
,success: function (data) {
var x = data.items;
console.log(x);
var str = '';
for (var i = 0; i < x.length; i++) {
str += '<li class="list-group-item">' + x[i].name + '</li>';
}
$("#displayInfo").html(str);
}
});
}
</script>