Skip to content

Commit

Permalink
Merge branch 'develop' into CooperatorsModerated
Browse files Browse the repository at this point in the history
  • Loading branch information
jvJUCA committed Apr 11, 2024
2 parents 80084f5 + 37d4927 commit 8735d79
Show file tree
Hide file tree
Showing 11 changed files with 328 additions and 250 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ For commercial support, academic collaborations, and answers to common questions
- Vue.js version: 2.6.12
- Vue CLI version: 4.3.1
- Vuetify version: 2.3.10
- Python version: 3.11.8

## Video Guide

Expand Down
4 changes: 2 additions & 2 deletions src/components/atoms/AddOptionBtn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
<v-col cols="12">
<v-text-field
v-model="option.description"
max-length="100"
counter="100"
max-length="250"
counter="250"
:label="
$t('HeuristicsTable.placeholders.optionDescription')
"
Expand Down
4 changes: 2 additions & 2 deletions src/components/atoms/RadarWeight.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ export default {
scale: {
ticks: {
suggestedMin: 0,
suggestedMax: 100,
display: false,
suggestedMax: this.maxvalue,
display: true,
},
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<template>
<div id="FileUpload" style="background-color:#F5F7FF">
<div id="FileUpload" class="rounded" style="background-color:#f5f7ff">
<v-card-title class="subtitleView">
Settings
</v-card-title>
<v-divider class="mb-4" />
<v-col justify="center">
<v-row class="px-6 pt-2">
<v-row class="px-6 ">
<v-btn
depressed
dark
Expand All @@ -12,9 +16,9 @@
Donwload CSV template
</v-btn>
</v-row>
<v-divider class="ma-4" />
<v-divider class="ma-8" />
<v-row>
<v-row class="px-8" justify="center" align="center">
<v-row class="px-8 mb-2" justify="center" align="center">
<v-file-input
ref="myFile"
v-model="csvFile"
Expand Down Expand Up @@ -193,4 +197,14 @@ export default {
.csv-box {
background-color: white;
}
.subtitleView {
font-family: 'Poppins', Helvetica;
font-style: normal;
font-weight: 500;
font-size: 18.1818px;
align-items: flex-end;
color: #000000;
margin-bottom: 4px;
padding-bottom: 2px;
}
</style>
42 changes: 21 additions & 21 deletions src/components/molecules/HeuristicsTable.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-row class="ma-0">
<v-row>
<!--Dialog Edit-->
<v-dialog v-model="dialogEdit" width="800" persistent>
<v-card v-if="itemEdit">
Expand Down Expand Up @@ -49,7 +49,7 @@
<v-dialog v-model="dialogQuestion" width="800" persistent>
<v-card v-if="newQuestion">
<v-card-title class="headline white--text" primary-title>
<v-row class="ma-0 mt-3">
<v-row class="ma-0 ">
<v-col cols="10">
<v-form ref="formQuestion" @submit.prevent="addQuestion()">
<v-text-field
Expand Down Expand Up @@ -136,15 +136,15 @@

<!-- Main -->
<v-col cols="12">
<v-card style="background: #f5f7ff; z-index: 10 !important" elevation="0">
<v-card style="background: #f5f7ff" elevation="0">
<v-card-title class="subtitleView">
{{ $t('HeuristicsTable.titles.currentHeuristics') }}
</v-card-title>
<v-divider />
<v-row v-if="heuristics.length" class="ma-0 pa-0">
<!--Heuristics List-->
<v-col class="ma-0 pa-0" cols="12" sm="6" md="4">
<v-list dense height="560px" class="pt-0" outlined>
<v-list height="560px" class="pt-0 ma-0 pa-0" dense>
<v-list-item
:disabled="testAnswerDocLength > 0 ? true : false"
:class="{ disabledBtnBackground: testAnswerDocLength > 0 }"
Expand Down Expand Up @@ -186,7 +186,7 @@
</v-text-field>
</v-subheader>
<v-divider />
<v-list dense height="470px" class="list-scroll">
<v-list height="470px" class="list-scroll">
<v-list-item-group v-model="itemSelect" color="#fca326">
<template v-if="filteredHeuristics.length === 0">
<center class="mt-16" style="color: #a7a7a7">
Expand Down Expand Up @@ -253,6 +253,7 @@
>
<v-icon
x-small
color="orange"
style="
margin: 0px !important;
padding: 0px !important;
Expand All @@ -277,6 +278,7 @@
>
<v-icon
x-small
color="orange"
style="
margin: 0px !important;
padding: 0px !important;
Expand Down Expand Up @@ -305,12 +307,9 @@
<!--Questions List-->
<v-col
v-if="itemSelect != null"
class="ma-0 pa-0 questionsList"
cols="12"
sm="6"
md="4"
class="ma-0 pa-0" cols="12" sm="6" md="4"
>
<v-list dense height="560px">
<v-list dense height="560px" class="ma-0 pa-0">
<v-subheader>
<v-clamp autoresize :max-lines="2">
{{ heuristics[itemSelect].title }} -
Expand Down Expand Up @@ -421,8 +420,8 @@
sm="6"
md="4"
>
<v-card height="560px" elevation="0">
<v-subheader class="pa-2">
<v-card height="560px" elevation="0" class="pa-0 ma-0">
<v-subheader class="px-2 pt-0 ma-0 " style="font-size: 12px; height: 40px">
{{ heuristics[itemSelect].questions[questionSelect].title }}
<v-spacer />
<v-menu v-model="menuQuestions" offset-x>
Expand Down Expand Up @@ -468,6 +467,7 @@
</v-menu>
</v-subheader>
<v-divider />

<v-row>
<v-col>
<v-data-table
Expand All @@ -479,14 +479,14 @@
:items-per-page="5"
>
<template v-slot:top>
<v-row class>
<v-col class="ml-2 mb-1 pa-4 pb-0">
<p class="subtitleView">
<v-row class="mx-2 my-0 pa-0" style="height: 40px">
<v-col class="ma-0 pa-0 py-1">
<p >
{{ $t('HeuristicsTable.titles.descriptions') }}
</p>
</v-col>
<v-col class="mr-2 mb-1 pb-0 pa-4">
<v-row justify="end" class="ma-0 pa-0">
<v-col class="ma-0 pa-0">
<v-row justify="end" class="ma-0 pa-0 pt-1">
<AddDescBtn
ref="descBtn"
:question-index="questionSelect"
Expand Down Expand Up @@ -923,8 +923,8 @@ export default {
}
.subtitleView {
font-style: normal;
font-weight: 200;
font-size: 18.1818px;
font-weight: 500;
font-size: 18.18px;
align-items: flex-end;
color: #000000;
margin-bottom: 4px;
Expand Down Expand Up @@ -1030,10 +1030,10 @@ export default {
@media (max-width: 600px) {
.questionsList {
margin-top: 7px;
margin-top: 0px;
}
.questionsContent {
margin-top: 7px;
margin-top: 0px;
}
}
</style>
6 changes: 3 additions & 3 deletions src/components/molecules/OptionsTable.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="mt-0 pa-0">
<div class="mt-0 pa-0 rounded-sm">
<v-data-table
height="420px"
style="background: #f5f7ff;"
Expand Down Expand Up @@ -27,7 +27,7 @@
<template v-slot:top>
<v-row class="ma-0" align="center">
<v-card-title class="subtitleView">
Current Options
Options
</v-card-title>
<v-row justify="end" class="ma-0 pa-0 mr-4">
<AddOptionBtn
Expand Down Expand Up @@ -162,7 +162,7 @@ export default {
<style scoped>
.subtitleView {
font-style: normal;
font-weight: 200;
font-weight: 500;
font-size: 18.1818px;
align-items: flex-end;
color: #000000;
Expand Down
57 changes: 41 additions & 16 deletions src/components/molecules/WeightTable.vue
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
<template>
<v-col>
<v-col style="background-color:#F5F7FF" class="rounded pa-0 ">
<v-card-title class="subtitleView">
Weights
</v-card-title>
<v-divider class="mb-4" />
<v-card
v-if="heuristics.length < 2"
class="mx-auto mt-10 mb-10 py-6 if-card"
class="mx-auto my-2 mb-5 py-6 if-card"
align="center"
width="970px"
>
Need at least 2 heuristics to be able to place the weights.
</v-card>
<v-card v-else class="mx-auto mt-10 mb-10 rounded-lg" width="950px">
<v-card v-else class="mx-auto mt-4 mb-5 rounded-0" elevation="0">
<!-- tabs -->
<template>
<v-tabs
v-model="tabs"
centered
background-color="#e35e1b"
dark
background-color="#F5F7FF"
color="orange"
show-arrows
>
<v-tabs-slider color="#FCA326" />
<v-tabs-slider color="#FF9800" />
<v-tab v-for="(heuri, index) in heuristics.length - 1" :key="index">
<v-tooltip top>
<template v-slot:activator="{ on, attrs }">
Expand All @@ -35,18 +38,19 @@
? heuristics.length - 1
: 0"
:key="pes"
style="background-color:#F5F7FF"
>
<v-card flat>
<v-card-text>
<v-card flat class="mx-4 mt-2 mb-8">
<v-card-text class="tablebody">
<v-simple-table>
<template>
<thead>
<tr>
<th class="text-left">
Heuristicas
Heuristics
</th>
<th class="text-center">
peso
Weights
</th>
</tr>
</thead>
Expand Down Expand Up @@ -75,12 +79,12 @@
</v-tooltip>
</td>
<!-- radio-group -->
<td class="text-center d-flex justify-center">
<td>
<v-radio-group
v-model="group[tabs][tam]"
dense
row
class="justify-space-between"
class="px-10 mx-2 v-input--radio-group__input justify-space-around"
>
<v-tooltip
v-for="(r, rad) in importance"
Expand All @@ -92,7 +96,7 @@
:label="`${r}`"
:value="r"
active-class
class="padding-left"
class="padding-left mx-4"
on-icon="mdi-check-circle-outline"
off-icon="mdi-checkbox-blank-circle-outline"
color="#FCA326"
Expand All @@ -119,11 +123,11 @@
class="mt-8 mb-4"
large
align="center"
color="#FCA326"
color="orange"
type="submit"
@click="updateDatas()"
>
save
save weight values
</v-btn>
</v-row>
</v-card-text>
Expand Down Expand Up @@ -223,4 +227,25 @@ export default {
width: 950px;
font-size: 18px;
}
.subtitleView {
font-family: 'Poppins', Helvetica;
font-style: normal;
font-weight: 500;
font-size: 18.1818px;
align-items: flex-end;
color: #000000;
margin-bottom: 4px;
padding-bottom: 2px;
}
.tablebody {
display: contents;
}
.v-input--radio-group__input {
border: none;
cursor: default;
display: flex;
width: 100%;
justify-content: space-evenly !important;
}
</style>
12 changes: 6 additions & 6 deletions src/components/organisms/EditHeuristicsTest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,33 @@
Options
</v-tab>
<v-tab @click="tabClicked(2)">
Import .csv
Weights
</v-tab>
<v-tab @click="tabClicked(3)">
Weights
Settings
</v-tab>
</v-tabs>

<div>
<Heuristic v-if="index == 0" :heuristics="object.heuristics" />
<OptionsTable v-if="index == 1" :options="object.options" />
<ImportCsvTable v-if="index == 2" :options="object.importCsv" />
<WeightTable v-if="index == 3" :options="object.weight" />
<WeightTable v-if="index == 2" :options="object.weight" />
<Settings v-if="index == 3" :options="object.settings" />
</div>
</div>
</template>

<script>
import Heuristic from '@/components/molecules/HeuristicsTable'
import OptionsTable from '@/components/molecules/OptionsTable'
import ImportCsvTable from '@/components/molecules/ImportCsvTable'
import Settings from '@/components/molecules/HeuristicsSenttings.vue'
import WeightTable from '@/components/molecules/WeightTable.vue'
export default {
components: {
Heuristic,
OptionsTable,
ImportCsvTable,
Settings,
WeightTable,
},
props: {
Expand Down
Loading

0 comments on commit 8735d79

Please sign in to comment.