Skip to content

Commit c699b65

Browse files
author
Mariusz Siewruk
committed
Added task content
1 parent f250147 commit c699b65

25 files changed

+533
-2
lines changed

.eslintrc.cjs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* eslint-env node */
2+
require('@rushstack/eslint-patch/modern-module-resolution')
3+
4+
module.exports = {
5+
root: true,
6+
'extends': [
7+
'plugin:vue/vue3-essential',
8+
'eslint:recommended',
9+
'@vue/eslint-config-typescript',
10+
'@vue/eslint-config-prettier/skip-formatting'
11+
],
12+
parserOptions: {
13+
ecmaVersion: 'latest'
14+
}
15+
}

.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
.DS_Store
12+
dist
13+
dist-ssr
14+
coverage
15+
*.local
16+
17+
/cypress/videos/
18+
/cypress/screenshots/
19+
20+
# Editor directories and files
21+
.vscode/*
22+
!.vscode/extensions.json
23+
.idea
24+
*.suo
25+
*.ntvs*
26+
*.njsproj
27+
*.sln
28+
*.sw?
29+
30+
*.tsbuildinfo
31+
32+
package-lock.jsonsadasd
33+

.prettierrc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "https://json.schemastore.org/prettierrc",
3+
"bracketSpacing": true,
4+
"printWidth": 140,
5+
"singleQuote": true,
6+
"trailingComma": "none",
7+
"tabWidth": 2,
8+
"useTabs": false,
9+
"semi": false
10+
}

README.md

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,42 @@
1-
# vue-recruitment-refactor-assignment
1+
# Full-stack technical assigment: front-end
22

3-
Front-end part of recruitment assignment for full stack dev position
3+
Hello! First of all - welcome and congrats that we can meet on this stage of the process!
4+
This is the task that covers frontend part of a full stack technical assigment.
5+
6+
## Guidelines:
7+
8+
- to create your copy, use the green "Use this template" button on the top right. It should be set as private repo. Do
9+
not use fork feature.
10+
- to start the app within the app root dir please run `npm i && npm run dev`
11+
- complete the task as described below
12+
- once completed - give access to the repo to the hiring manager and other people provided
13+
- send us the link to the pull request in your repo, in order for us to review your task
14+
15+
## Task description
16+
17+
Code represents POC of Visit Management Page.
18+
<br/><br/>Patient can see a visit date with the option to book a new appointment but provided solution does not meet all
19+
business requirements and has a few bugs.
20+
21+
### Issues to resolve:
22+
23+
- fix fetching available slots
24+
- apply correct date / time formatting to the slot element to make it more readable (only time should be displayed)
25+
26+
### The goal is to improve patient's experience by:
27+
28+
- grouping slots by day
29+
- when user clicks on a slot, booking action is triggered. Set up a confirmation step before booking new slot
30+
- adding loading state of your choice when slot is being booked
31+
- update confirmed date and available slots to avoid double bookings (two bookings for the same hour)
32+
33+
## Hints
34+
35+
- it's up to you how much time you want to spend
36+
- feel free to refactor and reorganise the code as you feel like
37+
- add any libraries that you might need
38+
- add tests
39+
- if you could do something better, but it feels like too much work - please put a comment and describe what would you
40+
do
41+
42+
### **Good luck!**

env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="vite/client" />

index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<link rel="icon" href="/favicon.ico">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>Vite App</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="/src/main.ts"></script>
12+
</body>
13+
</html>

package.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"name": "vue-recruitment-refactor-assignment",
3+
"version": "0.0.0",
4+
"private": true,
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "run-p type-check \"build-only {@}\" --",
9+
"preview": "vite preview",
10+
"test:unit": "vitest",
11+
"build-only": "vite build",
12+
"type-check": "vue-tsc --build --force",
13+
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
14+
"format": "prettier --write src/"
15+
},
16+
"dependencies": {
17+
"axios": "^1.7.7",
18+
"date-fns": "^4.1.0",
19+
"vue": "^3.4.29"
20+
},
21+
"devDependencies": {
22+
"@rushstack/eslint-patch": "^1.8.0",
23+
"@tsconfig/node20": "^20.1.4",
24+
"@types/jsdom": "^21.1.7",
25+
"@types/node": "^20.14.5",
26+
"@vitejs/plugin-vue": "^5.0.5",
27+
"@vue/eslint-config-prettier": "^9.0.0",
28+
"@vue/eslint-config-typescript": "^13.0.0",
29+
"@vue/test-utils": "^2.4.6",
30+
"@vue/tsconfig": "^0.5.1",
31+
"eslint": "^8.57.0",
32+
"eslint-plugin-vue": "^9.23.0",
33+
"jsdom": "^24.1.0",
34+
"npm-run-all2": "^6.2.0",
35+
"prettier": "^3.2.5",
36+
"sass-embedded": "^1.79.4",
37+
"typescript": "~5.4.0",
38+
"vite": "^5.3.1",
39+
"vite-plugin-vue-devtools": "^7.3.1",
40+
"vitest": "^1.6.0",
41+
"vue-tsc": "^2.0.21"
42+
}
43+
}

public/favicon.ico

4.19 KB
Binary file not shown.

src/App.vue

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<template>
2+
<div id="app" class="page">
3+
<AppointmentPage />
4+
</div>
5+
</template>
6+
7+
<script setup lang="ts">
8+
import AppointmentPage from '@/components/AppointmentPage.vue'
9+
</script>
10+
11+
<style scoped>
12+
.page {
13+
width: 100%;
14+
height: auto;
15+
min-height: 100%;
16+
flex: 1;
17+
background-color: #edeff2;
18+
display: flex;
19+
flex-direction: column;
20+
align-items: center;
21+
line-height: 1.5;
22+
padding: 50px 0;
23+
}
24+
</style>

src/assets/base.css

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
2+
*,
3+
*::before,
4+
*::after {
5+
box-sizing: border-box;
6+
margin: 0;
7+
font-weight: normal;
8+
}
9+
10+
body {
11+
min-height: 100vh;
12+
transition: color 0.5s,
13+
background-color 0.5s;
14+
line-height: 1.6;
15+
font-family: Inter,
16+
-apple-system,
17+
BlinkMacSystemFont,
18+
'Segoe UI',
19+
Roboto,
20+
Oxygen,
21+
Ubuntu,
22+
Cantarell,
23+
'Fira Sans',
24+
'Droid Sans',
25+
'Helvetica Neue',
26+
sans-serif;
27+
font-size: 15px;
28+
text-rendering: optimizeLegibility;
29+
-webkit-font-smoothing: antialiased;
30+
-moz-osx-font-smoothing: grayscale;
31+
}
32+
33+
button,
34+
p {
35+
margin: 0;
36+
padding: 0;
37+
}
38+
39+
button {
40+
cursor: pointer;
41+
}

0 commit comments

Comments
 (0)