Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abed Nego Lubis #3

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
> 1%
last 2 versions
not ie <= 8
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[*.{js,jsx,ts,tsx,vue}]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
17 changes: 17 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
root: true,
env: {
node: true
},
'extends': [
'plugin:vue/essential',
'@vue/standard'
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
},
parserOptions: {
parser: 'babel-eslint'
}
}
11 changes: 11 additions & 0 deletions .firebase/hosting.ZGlzdA.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
index.html,1548473693860,37fc5875575151bcd5d1c69942b9d2b1fb1f81273922b3395a118d7050683cc3
css/app.b2543eae.css,1548473693860,c95d75cc92018641ddc76094ed88f95cd0758fd5069853784c46275fe277b4e1
js/about.86cb28bb.js,1548473693860,23039409f4ecbedd5a84b4ed6a2246dde8d7586d7eeef5c2d37d12d486b1c16b
img/logo.ba069f50.jpeg,1548473693860,478f692003e570845c1d47760d26438463c1205bbfa6d590f96f3996927e566e
js/about.86cb28bb.js.map,1548473693904,eefc24ca2d3400e79ff09063d58f95b837efe9291545156f7e38dbeebb1c3ade
js/app.c81de524.js,1548473693904,c2cad0d9efc128af9100279d05759c8456c2c5608ac319f5c877d4e90504abfb
js/app.c81de524.js.map,1548473693904,883952c677ba29e79635b911c2b21b2523aca8628cd2a1cf95e92886545b2239
favico.png,1548473693860,8a351bdd026456d8cbb190031d1c2649bf9d09d2ec0ea7bd848e3fc4f056f4dd
css/chunk-vendors.40ed5c35.css,1548473693904,c3599f4d4ce174327874fd59afa9caae9b45260d40d37cada7f85b88e540f15a
js/chunk-vendors.9f8df121.js,1548473693904,35a92976ca4b81e174d4fc9eb3cb1dfbaca039e5fb80b33f912b57202229509c
js/chunk-vendors.9f8df121.js.map,1548473693904,5ebc5f1fdf83e19bfe918997d692d7079dec1cf5a8f6a53b88446cd36ec3d3b9
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "kanbanvue"
}
}
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.DS_Store
node_modules
/dist

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

config.json

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,32 @@
# kanban
# kanban

Link deploy : https://kanbanvue.firebaseapp.com/#/
http://daily.abednegolubis.online/#/

## Project setup
```
npm install
```

### Compiles and hot-reloads for development
```
npm run serve
```

### Compiles and minifies for production
```
npm run build
```

### Run your tests
```
npm run test
```

### Lints and fixes files
```
npm run lint
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
5 changes: 5 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/app'
]
}
16 changes: 16 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"hosting": {
"public": "dist",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
28 changes: 28 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "kanban",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"firebase": "^5.8.0",
"sass-loader": "^7.1.0",
"sweetalert": "^2.1.2",
"vue": "^2.5.21",
"vue-router": "^3.0.1",
"vuedraggable": "^2.17.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.3.0",
"@vue/cli-plugin-eslint": "^3.3.0",
"@vue/cli-service": "^3.3.0",
"@vue/eslint-config-standard": "^4.0.0",
"babel-eslint": "^10.0.1",
"eslint": "^5.8.0",
"eslint-plugin-vue": "^5.0.0",
"vue-template-compiler": "^2.5.21"
}
}
5 changes: 5 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
plugins: {
autoprefixer: {}
}
}
Binary file added public/favico.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
<link rel="shortcut icon" href="./favico.png">

<title>kanban</title>
</head>
<body>
<noscript>
<strong>We're sorry but kanban doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
18 changes: 18 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<template>
<div id="app">
<Navbar> </Navbar>
<router-view/>
</div>
</template>

<script>
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
import Navbar from '@/components/Navbar.vue'

export default {
components: {
Navbar
}
}
</script>
Binary file added src/assets/logo.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions src/components/HelloWorld.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<p>
For a guide and recipes on how to configure / customize this project,<br>
check out the
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
</p>
<h3>Installed CLI Plugins</h3>
<ul>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
</ul>
<h3>Essential Links</h3>
<ul>
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
</ul>
<h3>Ecosystem</h3>
<ul>
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
</ul>
</div>
</template>

<script>
export default {
name: 'HelloWorld',
props: {
msg: String
}
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>
106 changes: 106 additions & 0 deletions src/components/Navbar.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<template>
<div>
<b-navbar toggleable="md" type="light">

<b-navbar-toggle target="nav_collapse"></b-navbar-toggle>

<b-navbar-brand><img src="../assets/logo.jpeg" style="float : left; width: 35%;"> </b-navbar-brand>

<!-- Right aligned nav items -->
<b-navbar-nav class="ml-auto">
<b-button v-b-modal.newTask variant="primary" class="my-2 my-sm-0" type="submit">New Task</b-button>
</b-navbar-nav>
</b-navbar>
<b-modal id="newTask"
ref="modal"
title="New Task"
@shown="clearForm">
<b-form @submit="onSubmit" id="formTask">
<b-form-group id="titleGroup" label="Title">
<b-form-input id="titleInput"
type="text"
v-model="task.title"
required
placeholder="Enter task title...">
</b-form-input>
</b-form-group>
<b-form-group label="Description"
label-for="descriptionInput">
<b-form-textarea id="descriptionInput"
v-model="task.description"
placeholder="Enter description..."
:rows="3"
:max-rows="6">
</b-form-textarea>
</b-form-group>
<b-form-group label="Point"
label-for="poinInput">
<b-form-input id="poinInput"
type="number"
v-model="task.point"
required
placeholder="Enter point">
</b-form-input>
</b-form-group>
<b-form-group label="Assigned to"
label-for="assignInput">
<b-form-input id="assignInput"
type="text"
v-model="task.assigned"
required
placeholder="Enter assignee name">
</b-form-input>
</b-form-group>
</b-form>
<div slot="modal-footer">
<b-btn type="submit" class="float-right mx-2" form="formTask" variant="primary" >
Save
</b-btn>
<b-btn @click.prevent="handleCancel" class="float-right" variant="primary" >
Close
</b-btn>
</div>
</b-modal>
</div>
</template>

<script>
import db from '@/script/config.js'

export default {
name: 'navbar',
data() {
return {
task : {
title : '',
description : '',
point: '',
assigned : ''
}
}
},
methods: {
clearForm () {
this.task = {...this.task = ''}
},
handleCancel() {
this.clearForm()
this.$refs.modal.hide()
},
onSubmit () {
var input = this.task
input.status = 'backlog'
db.collection("tasks").add(input)
.then(function(docRef) {
console.log("Document written with ID: ", docRef.id);
})
.catch(function(error) {
console.error("Error adding document: ", error);
});

this.$refs.modal.hide()
}
}
}
</script>

Loading