Skip to content

Commit 042b58e

Browse files
committed
conflit
2 parents 95ae9eb + bc1edaf commit 042b58e

26 files changed

Lines changed: 1523 additions & 1570 deletions

File tree

package-lock.json

Lines changed: 373 additions & 285 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"@tiptap/vue-3": "^2.27.2",
3434
"@vue/babel-plugin-jsx": "^2.0.1",
3535
"@vueup/vue-quill": "^1.5.3",
36-
"axios": "^1.17.0",
36+
"axios": "^1.18.0",
3737
"buffer": "^6.0.3",
3838
"chart.js": "^4.5.1",
3939
"chartjs-adapter-date-fns": "^3.0.0",
@@ -49,9 +49,9 @@
4949
"process": "^0.11.10",
5050
"stream-browserify": "^3.0.0",
5151
"uid-generator": "^2.0.0",
52-
"vue": "^3.5.30",
52+
"vue": "^3.5.38",
5353
"vue-chartjs": "^5.3.3",
54-
"vue-i18n": "^11.4.5",
54+
"vue-i18n": "^11.4.6",
5555
"vue-loader": "^17.4.2",
5656
"vue-router": "^4.6.4",
5757
"vue-toastification": "^2.0.0-rc.5",
@@ -60,7 +60,7 @@
6060
"vuedraggable": "^4.1.0",
6161
"vuetify": "^3.12.8",
6262
"vuex": "^4.0.2",
63-
"wavesurfer.js": "^7.12.3"
63+
"wavesurfer.js": "^7.12.8"
6464
},
6565
"devDependencies": {
6666
"@babel/core": "^7.29.0",
@@ -76,21 +76,21 @@
7676
"@vue/cli-plugin-unit-jest": "^5.0.8",
7777
"@vue/cli-plugin-vuex": "^5.0.8",
7878
"@vue/cli-service": "^5.0.8",
79-
"@vue/compiler-sfc": "^3.5.32",
79+
"@vue/compiler-sfc": "^3.5.39",
8080
"@vue/test-utils": "^2.4.11",
8181
"@vue/vue3-jest": "^27.0.0",
8282
"babel-plugin-transform-require-context": "^0.1.1",
83-
"cypress": "^15.11.0",
83+
"cypress": "^15.18.0",
8484
"eslint": "^9.39.4",
8585
"eslint-config-prettier": "^10.1.8",
8686
"eslint-plugin-vue": "^10.9.2",
8787
"eslint-plugin-vuetify": "^2.7.2",
88-
"globals": "^17.5.0",
88+
"globals": "^17.7.0",
8989
"husky": "^9.1.7",
9090
"jsdoc": "^4.0.5",
9191
"jsdoc-vuex-plugin": "^1.0.0",
92-
"lint-staged": "^17.0.7",
93-
"prettier": "^3.8.2",
92+
"lint-staged": "^17.0.8",
93+
"prettier": "^3.9.1",
9494
"sass": "~1.32.6",
9595
"sass-loader": "~8.0.0",
9696
"vue-eslint-parser": "^10.4.1"

src/app/plugins/locales/en.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1972,6 +1972,13 @@
19721972
"answers": "Answers",
19731973
"no": "No"
19741974
},
1975+
"focusGroup": {
1976+
"manager": {
1977+
"title": "Focus Group",
1978+
"underConstruction": "The Focus Group module is under active development. Session setup, the live discussion room, and reporting are coming soon.",
1979+
"description": "For now you can manage cooperators and study settings. Use the navigation menu to invite participants and configure your study."
1980+
}
1981+
},
19751982
"studyCreation": {
19761983
"chooseEvaluationCategory": "Choose Evaluation Category",
19771984
"selectEvaluationType": "Select the type of evaluation you want to conduct for your study",
@@ -2031,6 +2038,20 @@
20312038
"description": "Compare two versions to determine which performs better"
20322039
}
20332040
},
2041+
"inquiry": {
2042+
"focus_group": {
2043+
"name": "Focus Group",
2044+
"description": "Moderated group discussion to gather qualitative insights from participants"
2045+
},
2046+
"survey": {
2047+
"name": "Survey",
2048+
"description": "Collect structured feedback from participants through questionnaires"
2049+
},
2050+
"interview": {
2051+
"name": "Interview",
2052+
"description": "One-on-one qualitative conversations to explore participant experiences"
2053+
}
2054+
},
20342055
"inspection": {
20352056
"heuristic_evaluation": {
20362057
"name": "Heuristic Evaluation",

src/app/plugins/locales/es.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1892,6 +1892,13 @@
18921892
"no": "No",
18931893
"sartAnalytics": "Análisis SART"
18941894
},
1895+
"focusGroup": {
1896+
"manager": {
1897+
"title": "Grupo Focal",
1898+
"underConstruction": "El módulo de Grupo Focal está en desarrollo activo. La configuración de sesiones, la sala de discusión en vivo y los informes estarán disponibles pronto.",
1899+
"description": "Por ahora puedes gestionar colaboradores y la configuración del estudio. Usa el menú de navegación para invitar participantes y configurar tu estudio."
1900+
}
1901+
},
18951902
"studyCreation": {
18961903
"chooseEvaluationCategory": "Elegir Categoría de Evaluación",
18971904
"selectEvaluationType": "Selecciona el tipo de evaluación que deseas realizar para tu estudio",
@@ -1951,6 +1958,20 @@
19511958
"description": "Compara dos versiones para determinar cuál tiene mejor rendimiento."
19521959
}
19531960
},
1961+
"inquiry": {
1962+
"focus_group": {
1963+
"name": "Grupo Focal",
1964+
"description": "Discusión grupal moderada para recopilar percepciones cualitativas de los participantes."
1965+
},
1966+
"survey": {
1967+
"name": "Encuesta",
1968+
"description": "Recopila comentarios estructurados de los participantes mediante cuestionarios."
1969+
},
1970+
"interview": {
1971+
"name": "Entrevista",
1972+
"description": "Conversaciones cualitativas individuales para explorar las experiencias de los participantes."
1973+
}
1974+
},
19541975
"inspection": {
19551976
"heuristic_evaluation": {
19561977
"name": "Evaluación Heurística",

src/app/router/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import CardSorting from '@/ux/CardSorting/router.js'
66
import HeuristicRoutes from '@/ux/Heuristic/router.js'
77
import accessibilityRoutes from '@/ux/accessibility/router.js'
88
import UserTestRoutes from '@/ux/UserTest/router.js'
9+
import FocusGroupRoutes from '@/ux/FocusGroup/router.js'
910
import store from '@/store'
1011

1112
const routes = [
@@ -16,6 +17,7 @@ const routes = [
1617
...accessibilityRoutes,
1718
...HeuristicRoutes,
1819
...UserTestRoutes,
20+
...FocusGroupRoutes,
1921
]
2022

2123
const router = createRouter({

src/controllers/StudyController.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,12 @@ export default class StudyController extends Controller {
6565
)
6666
await Promise.all(promises)
6767
}
68-
await super.update('users', payload.testAdmin.userDocId, payload.auxUser)
68+
// Remove only the deleted test from the admin's myTests/myAnswers via a
69+
// fresh read, instead of overwriting the whole user doc with a stale copy.
70+
await userController.removeTestFromUser(
71+
payload.testAdmin.userDocId,
72+
payload.id,
73+
)
6974
await super.delete(COLLECTION, payload.id)
7075
} catch (error) {
7176
throw error
@@ -95,10 +100,15 @@ export default class StudyController extends Controller {
95100
updateDate: Date.now(),
96101
})
97102

98-
// Update answers inside collaborator
103+
// Update answers inside collaborator. Only write the single myAnswers
104+
// entry; writing the full document with toFirestore() would overwrite
105+
// myTests with the stale in-memory copy of the cooperator.
99106
const userToUpdate = payload.cooperator
100107
userToUpdate.myAnswers[`${userAnswer.testDocId}`] = userAnswer.toFirestore()
101-
await userController.update(userToUpdate.id, userToUpdate.toFirestore())
108+
await userController.update(userToUpdate.id, {
109+
[`myAnswers.${userAnswer.testDocId}`]:
110+
userToUpdate.myAnswers[`${userAnswer.testDocId}`],
111+
})
102112

103113
const testToUpdate = payload.test
104114
const index = testToUpdate.cooperators.findIndex(

src/features/auth/controllers/UserController.js

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,11 @@ export default class UserController extends Controller {
139139
async addNotification(payload) {
140140
const userToUpdate = await this.getById(payload.userId)
141141
userToUpdate.notifications.push(payload.notification.toFirestore())
142-
return this.update(payload.userId, userToUpdate.toFirestore())
142+
// Only write the notifications field to avoid overwriting other fields
143+
// (e.g. myTests) with a stale in-memory copy.
144+
return this.update(payload.userId, {
145+
notifications: userToUpdate.notifications,
146+
})
143147
}
144148

145149
async markNotificationAsRead(payload) {
@@ -155,11 +159,11 @@ export default class UserController extends Controller {
155159
userToUpdate.notifications[notificationIndex].read = true
156160
userToUpdate.notifications[notificationIndex].readAt = Date.now()
157161

158-
// Save updated user data to Firestore
159-
await this.update(
160-
userToUpdate.id,
161-
userToUpdate.toFirestore(),
162-
)
162+
// Only write the notifications field. Writing the full document with
163+
// toFirestore() would overwrite myTests with the stale in-memory copy.
164+
await this.update(userToUpdate.id, {
165+
notifications: userToUpdate.notifications,
166+
})
163167
return userToUpdate
164168
} else {
165169
// Notification was not found in the array
@@ -181,10 +185,11 @@ export default class UserController extends Controller {
181185

182186
if (!hasUnread) return userToUpdate
183187

184-
await this.update(
185-
userToUpdate.id,
186-
userToUpdate.toFirestore(),
187-
)
188+
// Only write the notifications field. Writing the full document with
189+
// toFirestore() would overwrite myTests with the stale in-memory copy.
190+
await this.update(userToUpdate.id, {
191+
notifications: userToUpdate.notifications,
192+
})
188193
// Return the updated user object (in memory) so the store can commit it immediately
189194
return userToUpdate
190195
}
@@ -230,10 +235,10 @@ export default class UserController extends Controller {
230235
}
231236
const userData = userDoc.data()
232237

233-
if (userData.myTests[testIdToRemove]) {
238+
if (userData.myTests?.[testIdToRemove]) {
234239
delete userData.myTests[testIdToRemove]
235240
}
236-
if (userData.myAnswers[testIdToRemove]) {
241+
if (userData.myAnswers?.[testIdToRemove]) {
237242
delete userData.myAnswers[testIdToRemove]
238243
}
239244

src/features/ux_creation/ChooseStudyMethods.vue

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,34 @@ const methodsByCategory = {
113113
comingSoon: true,
114114
},
115115
],
116+
inquiry: [
117+
{
118+
id: METHOD_DEFINITIONS.FOCUS_GROUP.id,
119+
nameKey: 'studyCreation.methods.inquiry.focus_group.name',
120+
descKey: 'studyCreation.methods.inquiry.focus_group.description',
121+
icon: 'mdi-account-group',
122+
color: 'secondary',
123+
available: true,
124+
},
125+
{
126+
id: METHOD_DEFINITIONS.SURVEY.id,
127+
nameKey: 'studyCreation.methods.inquiry.survey.name',
128+
descKey: 'studyCreation.methods.inquiry.survey.description',
129+
icon: 'mdi-clipboard-text',
130+
color: 'primary',
131+
available: false,
132+
comingSoon: true,
133+
},
134+
{
135+
id: METHOD_DEFINITIONS.INTERVIEW.id,
136+
nameKey: 'studyCreation.methods.inquiry.interview.name',
137+
descKey: 'studyCreation.methods.inquiry.interview.description',
138+
icon: 'mdi-microphone',
139+
color: 'info',
140+
available: false,
141+
comingSoon: true,
142+
},
143+
],
116144
inspection: [
117145
{
118146
id: METHOD_DEFINITIONS.HEURISTICS.id,

src/features/ux_creation/StudyDetailsForm.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,8 @@ const submit = async () => {
422422
category.value == 'test' ? STUDY_TYPES.USER : STUDY_TYPES.HEURISTIC
423423
if (method.value === STUDY_TYPES.CARD_SORTING)
424424
testType = STUDY_TYPES.CARD_SORTING
425+
if (method.value === STUDY_TYPES.FOCUS_GROUP)
426+
testType = STUDY_TYPES.FOCUS_GROUP
425427
426428
isLoading.value = true
427429
const user = store.getters.user

0 commit comments

Comments
 (0)