update
This commit is contained in:
+13
-16
@@ -258,22 +258,19 @@
|
||||
function createDragItems() {
|
||||
const container = $("#content-drags");
|
||||
container.empty();
|
||||
const dragMapping = {
|
||||
"Zona interna del conector a paciente": 0,
|
||||
"Punta abierta en la línea de transferencia": 1,
|
||||
"Cassette en DPA": 2,
|
||||
"Parte interna del tapón minicap": 3,
|
||||
};
|
||||
questions.forEach((question, index) => {
|
||||
question.opciones.forEach((opcion, opcionIndex) => {
|
||||
const dragValue = dragMapping[opcion.text] !== undefined ? dragMapping[opcion.text] : 0;
|
||||
const dragItem = `
|
||||
<div class="drag-item px-3 py-2 bg-verde-claro-2 text-verde-oscuro fw-bold bx-shadow" data-drag="${dragValue}">
|
||||
<div class="d-flex flex-row justify-content-center align-items-center w-100 h-100"><div>${opcion.text}</div></div>
|
||||
</div>
|
||||
`;
|
||||
container.append(dragItem);
|
||||
});
|
||||
const dragItems = [
|
||||
{ text: "Zona interna del conector a paciente", value: 0 },
|
||||
{ text: "Punta abierta en la línea de transferencia", value: 1 },
|
||||
{ text: "Cassette en DPA", value: 2 },
|
||||
{ text: "Parte interna del tapón minicap", value: 3 },
|
||||
];
|
||||
dragItems.forEach((item) => {
|
||||
const dragItem = `
|
||||
<div class="drag-item px-3 py-2 bg-verde-claro-2 text-verde-oscuro fw-bold bx-shadow text-center" data-drag="${item.value}">
|
||||
<div class="d-flex flex-row justify-content-center align-items-center w-100 h-100"><div>${item.text}</div></div>
|
||||
</div>
|
||||
`;
|
||||
container.append(dragItem);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user