Merge branch 'feature/ui-test' into 'develop'

Feature/ui test

See merge request proj-wise2526-video2document/video2document!59
This commit is contained in:
Hughes, Mike
2025-12-16 16:44:50 +01:00
4 changed files with 43 additions and 33 deletions
+8 -8
View File
@@ -19,8 +19,8 @@
</label> </label>
<nav class="menu1"> <nav class="menu1">
<li class="li1">Help</li> <a href="index2.html" class="li1">Custom document</a>
<li class="li1">Language</li> <a href="index3.html" class="li1">Help</a>
</nav> </nav>
</nav> </nav>
</section> </section>
@@ -79,27 +79,27 @@
</div> </div>
</div> </div>
<div class="step" id="step3" style="display:none;"> <div class="step" id="step3" style="display:none;">
<div class="checkbox-group"> <div class="checkbox-group">
<label id="checkbox-label" for="checkbox-group">Choose prefered document style:</label> <label id="checkbox-label" for="checkbox-group">Choose prefered document style:</label>
<div class="checkbox-container"> <div class="checkbox-container">
<input type="checkbox" name ="docFormat" id="docFormat" value="Meeting report"> <input type="checkbox" name ="docFormat" id="docFormat" value="followup-report">
<label id="label_format" for="docFormat">Follow-up Report</label> <label id="label_format" for="docFormat">Follow-up Report</label>
</div> </div>
<div class="checkbox-container"> <div class="checkbox-container">
<input type="checkbox" name="docFormat" id="docFormatSummary1" value="Summary with timestamps"> <input type="checkbox" name="docFormat" id="docFormatSummary1" value="agenda">
<label id="label_summary" for="docFormatSummary">Agenda</label> <label id="label_summary" for="docFormatSummary">Agenda</label>
</div> </div>
<div class="checkbox-container"> <div class="checkbox-container">
<input type="checkbox" name="docFormat" id="docFormatSummary2" value="Summary with timestamps"> <input type="checkbox" name="docFormat" id="docFormatSummary2" value="result-protocol">
<label id="label_summary" for="docFormatSummary">Resultprotocol</label> <label id="label_summary" for="docFormatSummary">Resultprotocol</label>
</div> </div>
<div class="checkbox-container"> <div class="checkbox-container">
<input type="checkbox" name="docFormat" id="docFormatSummary3" value="Summary with timestamps"> <input type="checkbox" name="docFormat" id="docFormatSummary3" value="sprint-planning">
<label id="label_summary" for="docFormatSummary">Sprint Planning Note</label> <label id="label_summary" for="docFormatSummary">Sprint Planning Note</label>
</div> </div>
<div class="checkbox-container"> <div class="checkbox-container">
<input type="checkbox" name="docFormat" id="docFormatCustom" value="Summary with timestamps"> <input type="checkbox" name="docFormat" id="docFormatCustom" value="custom">
<select name="ai_type" id="ai_type"> <select name="ai_type" id="ai_type">
<option>nichts</option> <option>nichts</option>
</select> </select>
+8 -10
View File
@@ -27,15 +27,13 @@ function checkBoxes() {
if(testEndings.some(e => pathToLower.endsWith(e))){ if(testEndings.some(e => pathToLower.endsWith(e))){
//assembly of the json for the main //assembly of the json for the main
const selectedStyles = [checkedCounter]; var typeCheckbox;
var iter = 0; if(document.getElementById("docFormat").checked) typeCheckbox = document.getElementById("docFormat").value;
checkboxes.forEach(function(checkbox){ if(document.getElementById("docFormatSummary1").checked) typeCheckbox = document.getElementById("docFormatSummary1").value;
if(checkbox.checked){ if(document.getElementById("docFormatSummary2").checked) typeCheckbox = document.getElementById("docFormatSummary2").value;
console.log(checkbox.value); if(document.getElementById("docFormatSummary3").checked) typeCheckbox = document.getElementById("docFormatSummary3").value;
selectedStyles[iter] = {iter: checkbox.value}; if(document.getElementById("docFormatCustom").checked) typeCheckbox = document.getElementById("docFormatCustom").value;
iter++;
}
});
document.getElementById("testy").style.visibility = "visible" document.getElementById("testy").style.visibility = "visible"
document.getElementById("box1").style.backgroundColor = "red"; document.getElementById("box1").style.backgroundColor = "red";
document.getElementById("box2").style.backgroundColor = "red"; document.getElementById("box2").style.backgroundColor = "red";
@@ -55,7 +53,7 @@ function checkBoxes() {
}, },
"document": { "document": {
"module":aiType.value, "module":aiType.value,
"styles": selectedStyles, "type": typeCheckbox,
"outputType": outputType.value "outputType": outputType.value
} }
}; };
+8 -6
View File
@@ -177,10 +177,11 @@ input[type="file"] {
.submit-btn { .submit-btn {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center;
padding: 10px 20px; padding: 10px 20px;
margin-left: 80px; margin-left: 300px;
margin-top: 30px; margin-top: 30px;
margin-bottom: 10px; margin-bottom: 70px;
background-color: #007BFF; background-color: #007BFF;
color: white; color: white;
border: none; border: none;
@@ -420,7 +421,6 @@ li {
border-radius: 5px; border-radius: 5px;
background-color: #1C3B69; background-color: #1C3B69;
margin: 0; margin: 0;
display: -ms-grid;
display: grid; display: grid;
grid-template-rows: 1fr repeat(4, 0.5fr); grid-template-rows: 1fr repeat(4, 0.5fr);
grid-row-gap: 25px; grid-row-gap: 25px;
@@ -436,19 +436,21 @@ li {
-webkit-transition: all 0.3s ease; -webkit-transition: all 0.3s ease;
} }
.menu1 li:first-child { .menu1 a:first-child {
margin-top: 30px; margin-top: 30px;
} }
.menu1 li:last-child { .menu1 a:last-child {
margin-bottom: 30px; margin-bottom: 30px;
} }
.li1 { .li1 {
color: #fff;
width: 100%; width: 100%;
margin: 0; margin: 0;
padding: 10px 0; padding: 10px 0px;
font: 700 20px 'Oswald', sans-serif; font: 700 20px 'Oswald', sans-serif;
text-decoration: none;
} }
.li1:hover { .li1:hover {
+19 -9
View File
@@ -131,11 +131,21 @@ electron.ipcMain.on("file_submit", async (event, args) => {
try { try {
globalArgs = args globalArgs = args
let curstep = 0 let curstep = 0
let totalsteps = 3 + args.document.styles.length let totalsteps = 4
if(args.document.styles.length == 0) const TEMPLATE_MAP = {
throw new Error("At least one Document Style needed"); "followup-report": "followup_report.txt",
"agenda": "agenda.txt",
"result-protocol": "result_protocol.txt",
"sprint-planning": "sprint_planning_note.txt",
"custom": "custom_document.txt"
};
const templateFile = TEMPLATE_MAP[args.document.type];
if (!templateFile) {
throw new Error("Unknown document type: " + args.document.type);
}
console.log(args); console.log(args);
let audiopath = "" let audiopath = ""
@@ -184,10 +194,10 @@ electron.ipcMain.on("file_submit", async (event, args) => {
console.log("\n\n Running the LLM module"); console.log("\n\n Running the LLM module");
// TODO implement documentation module // TODO implement documentation module
// This code handles the Text to Document processing module call // This code handles the Text to Document processing module call
for (let i = 0; i < args.document.styles.length; i++) {
console.log(`\n\n Running the LLM for Document Style ${i+1}`);
await mapFunctions.get("module-handler").function(args.document.module, {inputTranscriptPath: transcriptpath, documentTypePath: "./storage/documentType/standard_meeting_report.txt", language: "en"}).then(resp => { console.log(`\n\n Running the LLM for Document Style ${args.document.type}`);
await mapFunctions.get("module-handler").function(args.document.module, { inputTranscriptPath: transcriptpath, documentTypePath: "./storage/documentType/" + templateFile, language: "en" }).then(resp => {
console.log(resp); console.log(resp);
globalFinalHtmlPath = resp globalFinalHtmlPath = resp
curstep++ curstep++
@@ -262,4 +272,4 @@ let q1 = {
{name:"abc", displayname:"ABC"}, {name:"abc", displayname:"ABC"},
{name:"qeg", displayname:"aqghegahu"} {name:"qeg", displayname:"aqghegahu"}
] ]
} }