Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
93982d4
initial commit
Jan 15, 2023
d05b5e0
add http client to api workspace
Jan 15, 2023
6700e21
implement transcriptions api on api workspace
Jan 15, 2023
b18dc57
add font assets
Jan 16, 2023
e26375a
add base ui layout
Jan 16, 2023
a3b978c
add icons assets
Jan 16, 2023
7ae7c25
add icon component and dictionary composable
Jan 16, 2023
dd0643e
add basic ui implementation
Jan 16, 2023
dc515eb
refactor transcriptions view with module components
Jan 17, 2023
c8cf95c
add checkbox component
Jan 17, 2023
a34a259
add transcription selection logic
Jan 17, 2023
d39ae24
add transcriptions service
Jan 17, 2023
880dfd8
add clickable option to app icon component
Jan 17, 2023
7e6c03c
update transcriptions store
Jan 17, 2023
c7e12e3
add fetch action to fetch transcription icon
Jan 17, 2023
24629fb
add delete transcription action to view
Jan 17, 2023
4ab1e7f
add save transcriptions action
Jan 17, 2023
2afebf6
add transcription creation action
Jan 17, 2023
98278f6
add app input component
Jan 17, 2023
45b16f4
add transcription update action
Jan 17, 2023
8ffb306
remove unused components
Jan 17, 2023
4cef635
fix transcription list item test
Jan 17, 2023
41be11b
fix page header title handler
Jan 17, 2023
c0ce6b2
add not found view
Jan 17, 2023
99cf7e6
fix and refactor tests
Jan 17, 2023
a91aa36
add ui tweaks on transcription list item component
Jan 18, 2023
847f143
add ui tweaks on transcription list item component
Jan 18, 2023
3101632
Merge branch 'master' of https://github.com/psnev89/unbabel-challenge
Jan 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
.DS_Store
dist
dist-ssr
*.local

/cypress/videos/
/cypress/screenshots/

# Editor directories and files
.vscode
.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
4 changes: 4 additions & 0 deletions api/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import transcriptions from "./transcriptions";
export default {
transcriptions
}
50 changes: 50 additions & 0 deletions api/infrastructure/http-client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/**
* AXIOS CLIENT WRAPPER
* Want to change http client? No problem, change it here.
*
* Improvements: add typescript & interfaces
*/
import axios from "axios";

export default class HttpClient {
static get(url, options = {}) {
return new Promise((resolve, reject) => {
axios
.get(url, options)
.then((res) => resolve(res.data))
.catch((err) => reject(err));
});
}
static post(url, payload, options = {}) {
return new Promise((resolve, reject) => {
axios
.post(url, payload, options)
.then((res) => resolve(res.data))
.catch((err) => reject(err));
});
}
static put() {
return new Promise((resolve, reject) => {
axios
.put(url, payload, options)
.then((res) => resolve(res.data))
.catch((err) => reject(err));
});
}
static patch() {
return new Promise((resolve, reject) => {
axios
.patch(url, payload, options)
.then((res) => resolve(res.data))
.catch((err) => reject(err));
});
}
static delete() {
return new Promise((resolve, reject) => {
axios
.delete(url, options)
.then((res) => resolve(res.data))
.catch((err) => reject(err));
});
}
}
9 changes: 9 additions & 0 deletions api/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "@pn/api",
"version": "1.0.0",
"private": true,
"main": "index.js",
"dependencies": {
"axios": "^1.2.2"
}
}
13 changes: 13 additions & 0 deletions api/transcriptions/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* TRANSCRIPTIONS API REPO
*/
import HttpClient from "../infrastructure/http-client";

const BASE_URL = "http://www.mocky.io/v2/5ae1c5792d00004d009d7e5c";

export default {
all: () => HttpClient.get(`${BASE_URL}`),
create: (payload) => HttpClient.post(`${BASE_URL}`, payload),
update: (id, payload) => HttpClient.put(`${BASE_URL}/${id}`, payload),
delete: (id) => HttpClient.delete(`${BASE_URL}/${id}`),
};
11 changes: 11 additions & 0 deletions app/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* eslint-env node */
require("@rushstack/eslint-patch/modern-module-resolution");

module.exports = {
root: true,
extends: [
"plugin:vue/essential",
"eslint:recommended",
"@vue/eslint-config-prettier",
],
};
41 changes: 41 additions & 0 deletions app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# app

This template should help get you started developing with Vue 3 in Vite.

## Recommended IDE Setup

[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).

## Customize configuration

See [Vite Configuration Reference](https://vitejs.dev/config/).

## Project Setup

```sh
npm install
```

### Compile and Hot-Reload for Development

```sh
npm run dev
```

### Compile and Minify for Production

```sh
npm run build
```

### Run Unit Tests with [Vitest](https://vitest.dev/)

```sh
npm run test:unit
```

### Lint with [ESLint](https://eslint.org/)

```sh
npm run lint
```
13 changes: 13 additions & 0 deletions app/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Unbabel FE Challenge</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
Loading