mirror of
https://github.com/bakhirev/assayo.git
synced 2025-01-18 16:37:50 +00:00
update
This commit is contained in:
parent
abe852f12c
commit
06ba43dc9f
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,7 @@
|
|||
import dataGripStore from 'ts/store/DataGrip';
|
||||
import { shuffle } from 'ts/helpers/random';
|
||||
import localization from 'ts/helpers/Localization';
|
||||
import achievementByAuthor from 'ts/helpers/achievement/byCompetition';
|
||||
|
||||
import IQuiz from '../interfaces/Quiz';
|
||||
import getQuestion from './getQuestion';
|
||||
|
@ -74,16 +75,35 @@ function getHowDaysInProject(authors: any) {
|
|||
return getQuestionByNumber('page.team.building.quiz.question15', rightAnswer);
|
||||
}
|
||||
|
||||
function getQuestionByAchievement(
|
||||
authors: any[],
|
||||
question: string,
|
||||
achievements: Function,
|
||||
achievement: string,
|
||||
) {
|
||||
const rightAnswer = authors.find((author) => achievements?.[author]?.[achievement]);
|
||||
if (!rightAnswer) return null;
|
||||
|
||||
const badAnswers = authors.filter((author) => author !== rightAnswer);
|
||||
const shortList = shuffle(badAnswers).slice(0, 2);
|
||||
const allAnswers = shuffle([...shortList, rightAnswer]);
|
||||
return getQuestion(question, allAnswers, allAnswers.indexOf(rightAnswer));
|
||||
}
|
||||
|
||||
export default function getQuizQuestions(): IQuiz {
|
||||
const authorsWithStaff = [...dataGripStore.dataGrip.author.statistic];
|
||||
const authors = authorsWithStaff.filter((data) => !data.isStaff);
|
||||
const authorNames = authors.map((stat) => stat.author);
|
||||
const dismissed = dataGripStore.dataGrip.author.employment.dismissed.length;
|
||||
const staff = dataGripStore.dataGrip.author.employment.staff.length;
|
||||
const randomUsers = shuffle([...authors]).slice(0, 3);
|
||||
|
||||
// во сколько чаще всего комитят
|
||||
// Кто устроился на работу в __Янаваре
|
||||
// Кто первый стал коммитить ночью
|
||||
const achievements = authors.reduce((byAuthor, author) => {
|
||||
const list = achievementByAuthor.authors[author.author].flat(1);
|
||||
const entries = list.map((key) => [key, true]);
|
||||
byAuthor[author.author] = Object.fromEntries(entries);
|
||||
return byAuthor;
|
||||
}, {});
|
||||
|
||||
const questions = [
|
||||
getQuestionByList(authorsWithStaff, 'page.team.building.quiz.question01', (s: any) => s.firstCommit.milliseconds),
|
||||
|
@ -91,11 +111,13 @@ export default function getQuizQuestions(): IQuiz {
|
|||
getQuestionByList(authors, 'page.team.building.quiz.question03', (s: any) => s.taskInDay),
|
||||
getQuestionByList(authors, 'page.team.building.quiz.question04', (s: any) => s.daysAll),
|
||||
getQuestionByList(authors, 'page.team.building.quiz.question05', (s: any) => s.daysAll, 2),
|
||||
getQuestionByList(authors, 'page.team.building.quiz.question06', (s: any) => s.commits / s.daysWorked),
|
||||
getQuestionByList(authors, 'page.team.building.quiz.question07', (s: any) => s.commits / s.daysWorked, 2),
|
||||
getQuestionByAchievement(authorNames, 'page.team.building.quiz.question16', achievements, 'moreAddedFolders'),
|
||||
getQuestionByAchievement(authorNames, 'page.team.building.quiz.question17', achievements, 'longFilePath'),
|
||||
getQuestionByAchievement(authorNames, 'page.team.building.quiz.question18', achievements, 'morePRMerge'),
|
||||
getQuestionByAchievement(authorNames, 'page.team.building.quiz.question19', achievements, 'longestMessage'),
|
||||
getQuestionByAchievement(authorNames, 'page.team.building.quiz.question20', achievements, 'longWaitPR'),
|
||||
getQuestionByList(authors, 'page.team.building.quiz.question08', (s: any) => s.middleMessageLength),
|
||||
getQuestionByList(authors, 'page.team.building.quiz.question09', (s: any) => s.middleMessageLength, 2),
|
||||
getQuestionByList(authors, 'page.team.building.quiz.question10', (s: any) => s.daysLosses / s.daysWorked, 2),
|
||||
getQuestionByNumber('page.team.building.quiz.question11', dismissed),
|
||||
getQuestionByNumber('page.team.building.quiz.question12', staff),
|
||||
getHowTaskInDay(randomUsers[0]),
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
cursor: pointer;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
outline-color: transparent;
|
||||
transition: width 0.5s;
|
||||
|
||||
&_wrapper {
|
||||
|
@ -81,15 +82,15 @@
|
|||
content: ' ';
|
||||
|
||||
position: absolute;
|
||||
top: -6px;
|
||||
left: 45%;
|
||||
top: -8px;
|
||||
left: 43%;
|
||||
|
||||
display: block;
|
||||
transform: rotate(45deg);
|
||||
|
||||
border: 12px solid var(--temp-bg);
|
||||
border-bottom: none;
|
||||
border-right: none;
|
||||
border: 8px solid #6E605E;
|
||||
border-bottom-color: transparent;
|
||||
border-right-color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -138,6 +139,9 @@
|
|||
}
|
||||
&_text {
|
||||
font-size: var(--font-s);
|
||||
&:before {
|
||||
left: 39%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.quiz_answer_wrapper_small .quiz_answer {
|
||||
|
|
|
@ -68,3 +68,6 @@
|
|||
border-left-color: var(--color-temp-border);
|
||||
}
|
||||
|
||||
.recommendations_modal.modal_window_fullscreen {
|
||||
background-color: var(--color-white);
|
||||
}
|
||||
|
|
|
@ -248,16 +248,18 @@ export default `
|
|||
§ page.team.building.quiz.question03: Who is the fastest at completing tasks?
|
||||
§ page.team.building.quiz.question04: Who has been working on the project the longest?
|
||||
§ page.team.building.quiz.question05: Who worked the least on the project?
|
||||
§ page.team.building.quiz.question06: Who is the committee most often?
|
||||
§ page.team.building.quiz.question07: Who commits less often?
|
||||
§ page.team.building.quiz.question08: Who has the longest commit signatures?
|
||||
§ page.team.building.quiz.question09: Who has the shortest commit signatures?
|
||||
§ page.team.building.quiz.question10: Who has the most days without comments?
|
||||
§ page.team.building.quiz.question11: How many people have quit?
|
||||
§ page.team.building.quiz.question12: How many people helped the project?
|
||||
§ page.team.building.quiz.question13: How many maximum tasks did $1 per day?
|
||||
§ page.team.building.quiz.question14: What type of tasks have been added more?
|
||||
§ page.team.building.quiz.question15: How many days do they work on the project on average?
|
||||
§ page.team.building.quiz.question16: Who created the most directories?
|
||||
§ page.team.building.quiz.question17: Who was the first to create the file with the deepest path?
|
||||
§ page.team.building.quiz.question18: Who clicks the "Merge" button for PR more often than others?
|
||||
§ page.team.building.quiz.question19: Who had the longest commit signature of all time?
|
||||
§ page.team.building.quiz.question20: Who created the PR that hung on the review for more than a month?
|
||||
§ page.team.building.quiz.begin: How well do you know the team?
|
||||
§ page.team.building.quiz.result1.title: Not enough
|
||||
§ page.team.building.quiz.result1.description: The correct answers are less than 40%. Check out the information about your team in the adjacent sections and try again!
|
||||
|
|
|
@ -250,16 +250,18 @@ export default `
|
|||
§ page.team.building.quiz.question03: Who is the fastest at completing tasks?
|
||||
§ page.team.building.quiz.question04: Who has been working on the project the longest?
|
||||
§ page.team.building.quiz.question05: Who worked the least on the project?
|
||||
§ page.team.building.quiz.question06: Who is the committee most often?
|
||||
§ page.team.building.quiz.question07: Who commits less often?
|
||||
§ page.team.building.quiz.question08: Who has the longest commit signatures?
|
||||
§ page.team.building.quiz.question09: Who has the shortest commit signatures?
|
||||
§ page.team.building.quiz.question10: Who has the most days without comments?
|
||||
§ page.team.building.quiz.question11: How many people have quit?
|
||||
§ page.team.building.quiz.question12: How many people helped the project?
|
||||
§ page.team.building.quiz.question13: How many maximum tasks did $1 per day?
|
||||
§ page.team.building.quiz.question14: What type of tasks have been added more?
|
||||
§ page.team.building.quiz.question15: How many days do they work on the project on average?
|
||||
§ page.team.building.quiz.question16: Who created the most directories?
|
||||
§ page.team.building.quiz.question17: Who was the first to create the file with the deepest path?
|
||||
§ page.team.building.quiz.question18: Who clicks the "Merge" button for PR more often than others?
|
||||
§ page.team.building.quiz.question19: Who had the longest commit signature of all time?
|
||||
§ page.team.building.quiz.question20: Who created the PR that hung on the review for more than a month?
|
||||
§ page.team.building.quiz.begin: How well do you know the team?
|
||||
§ page.team.building.quiz.result1.title: Not enough
|
||||
§ page.team.building.quiz.result1.description: The correct answers are less than 40%. Check out the information about your team in the adjacent sections and try again!
|
||||
|
|
|
@ -250,16 +250,18 @@ export default `
|
|||
§ page.team.building.quiz.question03: Who is the fastest at completing tasks?
|
||||
§ page.team.building.quiz.question04: Who has been working on the project the longest?
|
||||
§ page.team.building.quiz.question05: Who worked the least on the project?
|
||||
§ page.team.building.quiz.question06: Who is the committee most often?
|
||||
§ page.team.building.quiz.question07: Who commits less often?
|
||||
§ page.team.building.quiz.question08: Who has the longest commit signatures?
|
||||
§ page.team.building.quiz.question09: Who has the shortest commit signatures?
|
||||
§ page.team.building.quiz.question10: Who has the most days without comments?
|
||||
§ page.team.building.quiz.question11: How many people have quit?
|
||||
§ page.team.building.quiz.question12: How many people helped the project?
|
||||
§ page.team.building.quiz.question13: How many maximum tasks did $1 per day?
|
||||
§ page.team.building.quiz.question14: What type of tasks have been added more?
|
||||
§ page.team.building.quiz.question15: How many days do they work on the project on average?
|
||||
§ page.team.building.quiz.question16: Who created the most directories?
|
||||
§ page.team.building.quiz.question17: Who was the first to create the file with the deepest path?
|
||||
§ page.team.building.quiz.question18: Who clicks the "Merge" button for PR more often than others?
|
||||
§ page.team.building.quiz.question19: Who had the longest commit signature of all time?
|
||||
§ page.team.building.quiz.question20: Who created the PR that hung on the review for more than a month?
|
||||
§ page.team.building.quiz.begin: How well do you know the team?
|
||||
§ page.team.building.quiz.result1.title: Not enough
|
||||
§ page.team.building.quiz.result1.description: The correct answers are less than 40%. Check out the information about your team in the adjacent sections and try again!
|
||||
|
|
|
@ -250,16 +250,18 @@ export default `
|
|||
§ page.team.building.quiz.question03: Who is the fastest at completing tasks?
|
||||
§ page.team.building.quiz.question04: Who has been working on the project the longest?
|
||||
§ page.team.building.quiz.question05: Who worked the least on the project?
|
||||
§ page.team.building.quiz.question06: Who is the committee most often?
|
||||
§ page.team.building.quiz.question07: Who commits less often?
|
||||
§ page.team.building.quiz.question08: Who has the longest commit signatures?
|
||||
§ page.team.building.quiz.question09: Who has the shortest commit signatures?
|
||||
§ page.team.building.quiz.question10: Who has the most days without comments?
|
||||
§ page.team.building.quiz.question11: How many people have quit?
|
||||
§ page.team.building.quiz.question12: How many people helped the project?
|
||||
§ page.team.building.quiz.question13: How many maximum tasks did $1 per day?
|
||||
§ page.team.building.quiz.question14: What type of tasks have been added more?
|
||||
§ page.team.building.quiz.question15: How many days do they work on the project on average?
|
||||
§ page.team.building.quiz.question16: Who created the most directories?
|
||||
§ page.team.building.quiz.question17: Who was the first to create the file with the deepest path?
|
||||
§ page.team.building.quiz.question18: Who clicks the "Merge" button for PR more often than others?
|
||||
§ page.team.building.quiz.question19: Who had the longest commit signature of all time?
|
||||
§ page.team.building.quiz.question20: Who created the PR that hung on the review for more than a month?
|
||||
§ page.team.building.quiz.begin: How well do you know the team?
|
||||
§ page.team.building.quiz.result1.title: Not enough
|
||||
§ page.team.building.quiz.result1.description: The correct answers are less than 40%. Check out the information about your team in the adjacent sections and try again!
|
||||
|
|
|
@ -250,16 +250,18 @@ export default `
|
|||
§ page.team.building.quiz.question03: Who is the fastest at completing tasks?
|
||||
§ page.team.building.quiz.question04: Who has been working on the project the longest?
|
||||
§ page.team.building.quiz.question05: Who worked the least on the project?
|
||||
§ page.team.building.quiz.question06: Who is the committee most often?
|
||||
§ page.team.building.quiz.question07: Who commits less often?
|
||||
§ page.team.building.quiz.question08: Who has the longest commit signatures?
|
||||
§ page.team.building.quiz.question09: Who has the shortest commit signatures?
|
||||
§ page.team.building.quiz.question10: Who has the most days without comments?
|
||||
§ page.team.building.quiz.question11: How many people have quit?
|
||||
§ page.team.building.quiz.question12: How many people helped the project?
|
||||
§ page.team.building.quiz.question13: How many maximum tasks did $1 per day?
|
||||
§ page.team.building.quiz.question14: What type of tasks have been added more?
|
||||
§ page.team.building.quiz.question15: How many days do they work on the project on average?
|
||||
§ page.team.building.quiz.question16: Who created the most directories?
|
||||
§ page.team.building.quiz.question17: Who was the first to create the file with the deepest path?
|
||||
§ page.team.building.quiz.question18: Who clicks the "Merge" button for PR more often than others?
|
||||
§ page.team.building.quiz.question19: Who had the longest commit signature of all time?
|
||||
§ page.team.building.quiz.question20: Who created the PR that hung on the review for more than a month?
|
||||
§ page.team.building.quiz.begin: How well do you know the team?
|
||||
§ page.team.building.quiz.result1.title: Not enough
|
||||
§ page.team.building.quiz.result1.description: The correct answers are less than 40%. Check out the information about your team in the adjacent sections and try again!
|
||||
|
|
|
@ -250,16 +250,18 @@ export default `
|
|||
§ page.team.building.quiz.question03: Who is the fastest at completing tasks?
|
||||
§ page.team.building.quiz.question04: Who has been working on the project the longest?
|
||||
§ page.team.building.quiz.question05: Who worked the least on the project?
|
||||
§ page.team.building.quiz.question06: Who is the committee most often?
|
||||
§ page.team.building.quiz.question07: Who commits less often?
|
||||
§ page.team.building.quiz.question08: Who has the longest commit signatures?
|
||||
§ page.team.building.quiz.question09: Who has the shortest commit signatures?
|
||||
§ page.team.building.quiz.question10: Who has the most days without comments?
|
||||
§ page.team.building.quiz.question11: How many people have quit?
|
||||
§ page.team.building.quiz.question12: How many people helped the project?
|
||||
§ page.team.building.quiz.question13: How many maximum tasks did $1 per day?
|
||||
§ page.team.building.quiz.question14: What type of tasks have been added more?
|
||||
§ page.team.building.quiz.question15: How many days do they work on the project on average?
|
||||
§ page.team.building.quiz.question16: Who created the most directories?
|
||||
§ page.team.building.quiz.question17: Who was the first to create the file with the deepest path?
|
||||
§ page.team.building.quiz.question18: Who clicks the "Merge" button for PR more often than others?
|
||||
§ page.team.building.quiz.question19: Who had the longest commit signature of all time?
|
||||
§ page.team.building.quiz.question20: Who created the PR that hung on the review for more than a month?
|
||||
§ page.team.building.quiz.begin: How well do you know the team?
|
||||
§ page.team.building.quiz.result1.title: Not enough
|
||||
§ page.team.building.quiz.result1.description: The correct answers are less than 40%. Check out the information about your team in the adjacent sections and try again!
|
||||
|
|
|
@ -250,16 +250,18 @@ export default `
|
|||
§ page.team.building.quiz.question03: Who is the fastest at completing tasks?
|
||||
§ page.team.building.quiz.question04: Who has been working on the project the longest?
|
||||
§ page.team.building.quiz.question05: Who worked the least on the project?
|
||||
§ page.team.building.quiz.question06: Who is the committee most often?
|
||||
§ page.team.building.quiz.question07: Who commits less often?
|
||||
§ page.team.building.quiz.question08: Who has the longest commit signatures?
|
||||
§ page.team.building.quiz.question09: Who has the shortest commit signatures?
|
||||
§ page.team.building.quiz.question10: Who has the most days without comments?
|
||||
§ page.team.building.quiz.question11: How many people have quit?
|
||||
§ page.team.building.quiz.question12: How many people helped the project?
|
||||
§ page.team.building.quiz.question13: How many maximum tasks did $1 per day?
|
||||
§ page.team.building.quiz.question14: What type of tasks have been added more?
|
||||
§ page.team.building.quiz.question15: How many days do they work on the project on average?
|
||||
§ page.team.building.quiz.question16: Who created the most directories?
|
||||
§ page.team.building.quiz.question17: Who was the first to create the file with the deepest path?
|
||||
§ page.team.building.quiz.question18: Who clicks the "Merge" button for PR more often than others?
|
||||
§ page.team.building.quiz.question19: Who had the longest commit signature of all time?
|
||||
§ page.team.building.quiz.question20: Who created the PR that hung on the review for more than a month?
|
||||
§ page.team.building.quiz.begin: How well do you know the team?
|
||||
§ page.team.building.quiz.result1.title: Not enough
|
||||
§ page.team.building.quiz.result1.description: The correct answers are less than 40%. Check out the information about your team in the adjacent sections and try again!
|
||||
|
|
|
@ -250,16 +250,18 @@ export default `
|
|||
§ page.team.building.quiz.question03: Кто быстрее всех делает задачи?
|
||||
§ page.team.building.quiz.question04: Кто дольше всех работал на проекте?
|
||||
§ page.team.building.quiz.question05: Кто меньше всех работал на проекте?
|
||||
§ page.team.building.quiz.question06: Кто чаще коммитит?
|
||||
§ page.team.building.quiz.question07: Кто реже коммитит?
|
||||
§ page.team.building.quiz.question08: У кого саммые длинные подписи коммитов?
|
||||
§ page.team.building.quiz.question09: У кого саммые короткие подписи коммитов?
|
||||
§ page.team.building.quiz.question10: У кого больше всего дней без коммитов?
|
||||
§ page.team.building.quiz.question11: Сколько человек уволилось?
|
||||
§ page.team.building.quiz.question12: Сколько человек помогало проекту?
|
||||
§ page.team.building.quiz.question13: Сколько максимум задач в день делал $1?
|
||||
§ page.team.building.quiz.question14: Задач какого типа больше влили?
|
||||
§ page.team.building.quiz.question15: Сколько в среднем дней работают на проекте?
|
||||
§ page.team.building.quiz.question16: Кто создал больше всех дирректорий?
|
||||
§ page.team.building.quiz.question17: Кто первый создал файл с самым глубоким вложением?
|
||||
§ page.team.building.quiz.question18: Кто чаще остальных нажимает кнопку «Влить» для PR?
|
||||
§ page.team.building.quiz.question19: У кого была самая длинная подпись коммита за все время?
|
||||
§ page.team.building.quiz.question20: Кто создал PR, который больше месяца провисел на ревью?
|
||||
§ page.team.building.quiz.begin: Насколько хорошо ты знаешь команду?
|
||||
§ page.team.building.quiz.result1.title: Недостаточно
|
||||
§ page.team.building.quiz.result1.description: Правильных ответов меньше 40%. Ознакомьтесь с данными о вашей команде в соседних разделах и попробуйте снова!
|
||||
|
|
|
@ -245,16 +245,18 @@ export default `
|
|||
§ page.team.building.quiz.question03: Who is the fastest at completing tasks?
|
||||
§ page.team.building.quiz.question04: Who has been working on the project the longest?
|
||||
§ page.team.building.quiz.question05: Who worked the least on the project?
|
||||
§ page.team.building.quiz.question06: Who is the committee most often?
|
||||
§ page.team.building.quiz.question07: Who commits less often?
|
||||
§ page.team.building.quiz.question08: Who has the longest commit signatures?
|
||||
§ page.team.building.quiz.question09: Who has the shortest commit signatures?
|
||||
§ page.team.building.quiz.question10: Who has the most days without comments?
|
||||
§ page.team.building.quiz.question11: How many people have quit?
|
||||
§ page.team.building.quiz.question12: How many people helped the project?
|
||||
§ page.team.building.quiz.question13: How many maximum tasks did $1 per day?
|
||||
§ page.team.building.quiz.question14: What type of tasks have been added more?
|
||||
§ page.team.building.quiz.question15: How many days do they work on the project on average?
|
||||
§ page.team.building.quiz.question16: Who created the most directories?
|
||||
§ page.team.building.quiz.question17: Who was the first to create the file with the deepest path?
|
||||
§ page.team.building.quiz.question18: Who clicks the "Merge" button for PR more often than others?
|
||||
§ page.team.building.quiz.question19: Who had the longest commit signature of all time?
|
||||
§ page.team.building.quiz.question20: Who created the PR that hung on the review for more than a month?
|
||||
§ page.team.building.quiz.begin: How well do you know the team?
|
||||
§ page.team.building.quiz.result1.title: Not enough
|
||||
§ page.team.building.quiz.result1.description: The correct answers are less than 40%. Check out the information about your team in the adjacent sections and try again!
|
||||
|
|
Loading…
Reference in a new issue