adapted for ratings
This commit is contained in:
parent
b4acd7ddf4
commit
83581ef5cc
@ -57,6 +57,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(async()=>{
|
$(document).ready(async()=>{
|
||||||
|
µ('input, textarea, #submit').prop("disabled", data.year < (new Date()).getFullYear());
|
||||||
|
if(data.year < (new Date()).getFullYear()) $('#submit')[0].remove();
|
||||||
µ('#aksi').val(data.actions);
|
µ('#aksi').val(data.actions);
|
||||||
µ('#enttarget').val(data.entityTarget);
|
µ('#enttarget').val(data.entityTarget);
|
||||||
µ('#indikator').val(data.indicators);
|
µ('#indikator').val(data.indicators);
|
||||||
|
@ -12,6 +12,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<textarea disabled id="solusi" style="width: 100%;height: 6em; resize: none;" maxlength="240" placeholder="(Tidak ada solusi)">
|
<textarea disabled id="solusi" style="width: 100%;height: 6em; resize: none;" maxlength="240" placeholder="(Tidak ada solusi)">
|
||||||
</textarea>
|
</textarea>
|
||||||
|
<div>
|
||||||
|
Rating: <span id="rating"></span>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
Catatan Evaluasi:
|
Catatan Evaluasi:
|
||||||
</div>
|
</div>
|
||||||
@ -20,9 +23,16 @@
|
|||||||
<script type="module">
|
<script type="module">
|
||||||
const thisDialog = moly.lastDialog();
|
const thisDialog = moly.lastDialog();
|
||||||
const data = thisDialog.data;
|
const data = thisDialog.data;
|
||||||
const journal = data.journal.find(j=>j.status == 4);
|
// const journal = data.journal.find(j=>j.status == 4);
|
||||||
const evalnotes = data.journal.find(j=>j.status == 8).notes;
|
const evalnotes = JSON.parse(data.journal.find(j=>j.status == 8).notes);
|
||||||
const notes = JSON.parse(journal.notes);
|
const notes = JSON.parse(data.journal.find(j=>j.status == 4).notes);
|
||||||
|
let str = "☆☆☆☆☆";
|
||||||
|
for(let s=1;s<=evalnotes.r;s++)
|
||||||
|
{
|
||||||
|
str = "★" + str;
|
||||||
|
str = str.substring(0,5);
|
||||||
|
}
|
||||||
|
µ('#rating').text(str);
|
||||||
function µ(selector)
|
function µ(selector)
|
||||||
{
|
{
|
||||||
if (selector) return $(thisDialog.box).find(selector);
|
if (selector) return $(thisDialog.box).find(selector);
|
||||||
@ -31,7 +41,7 @@
|
|||||||
µ('#sasaran').text(data.sasaran);
|
µ('#sasaran').text(data.sasaran);
|
||||||
µ('#kendala').text(notes.kendala);
|
µ('#kendala').text(notes.kendala);
|
||||||
µ('#solusi').text(notes.solusi);
|
µ('#solusi').text(notes.solusi);
|
||||||
µ('#evalnotes').text(evalnotes);
|
µ('#evalnotes').text(evalnotes.m);
|
||||||
µ('#ve').text(journal.document);
|
µ('#ve').text(journal.document);
|
||||||
µ('#ve').click(async()=>{
|
µ('#ve').click(async()=>{
|
||||||
const loadid = moly.loadScreen.show("Memroses berkas...","bar","#main");
|
const loadid = moly.loadScreen.show("Memroses berkas...","bar","#main");
|
||||||
|
@ -214,12 +214,8 @@
|
|||||||
st.style = statusStyles[v.styleCode];
|
st.style = statusStyles[v.styleCode];
|
||||||
$(ro).click(async()=>{
|
$(ro).click(async()=>{
|
||||||
const data = v;
|
const data = v;
|
||||||
if (data.journal.at(-1).status < 2)
|
console.log(data);
|
||||||
{
|
if (data.journal.at(-1).status == 8)
|
||||||
const vw = await moly.dialog.show({title: "Detil Program Kerja", content: "/modules/kegiatan-proker-edit.html", fetching: true, data});
|
|
||||||
if(vw) populateProker();
|
|
||||||
}
|
|
||||||
else if (data.journal.at(-1).status == 8)
|
|
||||||
{
|
{
|
||||||
await moly.dialog.show({title: "Hasil Evaluasi Aksi Perubahan", content: "/modules/kegiatan-proker-evaled.html", fetching: true, data})
|
await moly.dialog.show({title: "Hasil Evaluasi Aksi Perubahan", content: "/modules/kegiatan-proker-evaled.html", fetching: true, data})
|
||||||
}
|
}
|
||||||
@ -232,6 +228,11 @@
|
|||||||
const ev = await moly.dialog.show({title: "Upload Eviden Akhir Aksi Perubahan", content: "/modules/kegiatan-proker-finish.html", fetching: true, data});
|
const ev = await moly.dialog.show({title: "Upload Eviden Akhir Aksi Perubahan", content: "/modules/kegiatan-proker-finish.html", fetching: true, data});
|
||||||
if (ev) populateProker();
|
if (ev) populateProker();
|
||||||
}
|
}
|
||||||
|
else if (data.journal.at(-1).status < 2 || data.year < (new Date()).getFullYear())
|
||||||
|
{
|
||||||
|
const vw = await moly.dialog.show({title: "Detil Program Kerja", content: "/modules/kegiatan-proker-edit.html", fetching: true, data});
|
||||||
|
if(vw) populateProker();
|
||||||
|
}
|
||||||
})
|
})
|
||||||
$('#proker #pkContent').append(ro);
|
$('#proker #pkContent').append(ro);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user