Compare commits
12 Commits
710015a37b
...
dev
Author | SHA1 | Date | |
---|---|---|---|
da5f53c267 | |||
8b92697870 | |||
4ddfa1654f | |||
acab0a9d68 | |||
e22445646a | |||
e191a47be5 | |||
08c14e1887 | |||
9e123a9542 | |||
2d0c2c4df9 | |||
da86f4b9f1 | |||
5eb9837e1c | |||
9cf4cf934b |
1
public/user-cog-solid.svg
Normal file
1
public/user-cog-solid.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="user-cog" class="svg-inline--fa fa-user-cog fa-w-20" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M610.5 373.3c2.6-14.1 2.6-28.5 0-42.6l25.8-14.9c3-1.7 4.3-5.2 3.3-8.5-6.7-21.6-18.2-41.2-33.2-57.4-2.3-2.5-6-3.1-9-1.4l-25.8 14.9c-10.9-9.3-23.4-16.5-36.9-21.3v-29.8c0-3.4-2.4-6.4-5.7-7.1-22.3-5-45-4.8-66.2 0-3.3.7-5.7 3.7-5.7 7.1v29.8c-13.5 4.8-26 12-36.9 21.3l-25.8-14.9c-2.9-1.7-6.7-1.1-9 1.4-15 16.2-26.5 35.8-33.2 57.4-1 3.3.4 6.8 3.3 8.5l25.8 14.9c-2.6 14.1-2.6 28.5 0 42.6l-25.8 14.9c-3 1.7-4.3 5.2-3.3 8.5 6.7 21.6 18.2 41.1 33.2 57.4 2.3 2.5 6 3.1 9 1.4l25.8-14.9c10.9 9.3 23.4 16.5 36.9 21.3v29.8c0 3.4 2.4 6.4 5.7 7.1 22.3 5 45 4.8 66.2 0 3.3-.7 5.7-3.7 5.7-7.1v-29.8c13.5-4.8 26-12 36.9-21.3l25.8 14.9c2.9 1.7 6.7 1.1 9-1.4 15-16.2 26.5-35.8 33.2-57.4 1-3.3-.4-6.8-3.3-8.5l-25.8-14.9zM496 400.5c-26.8 0-48.5-21.8-48.5-48.5s21.8-48.5 48.5-48.5 48.5 21.8 48.5 48.5-21.7 48.5-48.5 48.5zM224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm201.2 226.5c-2.3-1.2-4.6-2.6-6.8-3.9l-7.9 4.6c-6 3.4-12.8 5.3-19.6 5.3-10.9 0-21.4-4.6-28.9-12.6-18.3-19.8-32.3-43.9-40.2-69.6-5.5-17.7 1.9-36.4 17.9-45.7l7.9-4.6c-.1-2.6-.1-5.2 0-7.8l-7.9-4.6c-16-9.2-23.4-28-17.9-45.7.9-2.9 2.2-5.8 3.2-8.7-3.8-.3-7.5-1.2-11.4-1.2h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c10.1 0 19.5-3.2 27.2-8.5-1.2-3.8-2-7.7-2-11.8v-9.2z"></path></svg>
|
After Width: | Height: | Size: 1.5 KiB |
@@ -1,6 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<Nav></Nav>
|
<Nav></Nav>
|
||||||
<router-view></router-view>
|
<div class="content">
|
||||||
|
<router-view></router-view>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -14,4 +16,5 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style></style>
|
<style>
|
||||||
|
</style>
|
||||||
|
@@ -7,77 +7,78 @@ const isDevelopment = process.env.NODE_ENV !== 'production'
|
|||||||
|
|
||||||
// Scheme must be registered before the app is ready
|
// Scheme must be registered before the app is ready
|
||||||
protocol.registerSchemesAsPrivileged([
|
protocol.registerSchemesAsPrivileged([
|
||||||
{ scheme: 'app', privileges: { secure: true, standard: true } }
|
{ scheme: 'app', privileges: { secure: true, standard: true } }
|
||||||
])
|
])
|
||||||
|
|
||||||
async function createWindow() {
|
async function createWindow() {
|
||||||
// Create the browser window.
|
// Create the browser window.
|
||||||
const win = new BrowserWindow({
|
const win = new BrowserWindow({
|
||||||
width: 800,
|
width: 800,
|
||||||
height: 600,
|
height: 600,
|
||||||
webPreferences: {
|
autoHideMenuBar: true,
|
||||||
|
webPreferences: {
|
||||||
// Use pluginOptions.nodeIntegration, leave this alone
|
|
||||||
// See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info
|
|
||||||
nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION,
|
|
||||||
contextIsolation: !process.env.ELECTRON_NODE_INTEGRATION
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
if (process.env.WEBPACK_DEV_SERVER_URL) {
|
// Use pluginOptions.nodeIntegration, leave this alone
|
||||||
// Load the url of the dev server if in development mode
|
// See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info
|
||||||
await win.loadURL(process.env.WEBPACK_DEV_SERVER_URL)
|
nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION,
|
||||||
if (!process.env.IS_TEST) win.webContents.openDevTools()
|
contextIsolation: !process.env.ELECTRON_NODE_INTEGRATION
|
||||||
} else {
|
}
|
||||||
createProtocol('app')
|
})
|
||||||
// Load the index.html when not in development
|
|
||||||
win.loadURL('app://./index.html')
|
if (process.env.WEBPACK_DEV_SERVER_URL) {
|
||||||
}
|
// Load the url of the dev server if in development mode
|
||||||
|
await win.loadURL(process.env.WEBPACK_DEV_SERVER_URL)
|
||||||
|
if (!process.env.IS_TEST) win.webContents.openDevTools()
|
||||||
|
} else {
|
||||||
|
createProtocol('app')
|
||||||
|
// Load the index.html when not in development
|
||||||
|
win.loadURL('app://./index.html')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Quit when all windows are closed.
|
// Quit when all windows are closed.
|
||||||
app.on('window-all-closed', () => {
|
app.on('window-all-closed', () => {
|
||||||
// On macOS it is common for applications and their menu bar
|
// On macOS it is common for applications and their menu bar
|
||||||
// to stay active until the user quits explicitly with Cmd + Q
|
// to stay active until the user quits explicitly with Cmd + Q
|
||||||
if (process.platform !== 'darwin') {
|
if (process.platform !== 'darwin') {
|
||||||
app.quit()
|
app.quit()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
app.on('activate', () => {
|
app.on('activate', () => {
|
||||||
// On macOS it's common to re-create a window in the app when the
|
// On macOS it's common to re-create a window in the app when the
|
||||||
// dock icon is clicked and there are no other windows open.
|
// dock icon is clicked and there are no other windows open.
|
||||||
if (BrowserWindow.getAllWindows().length === 0) createWindow()
|
if (BrowserWindow.getAllWindows().length === 0) createWindow()
|
||||||
})
|
})
|
||||||
|
|
||||||
// This method will be called when Electron has finished
|
// This method will be called when Electron has finished
|
||||||
// initialization and is ready to create browser windows.
|
// initialization and is ready to create browser windows.
|
||||||
// Some APIs can only be used after this event occurs.
|
// Some APIs can only be used after this event occurs.
|
||||||
app.on('ready', async () => {
|
app.on('ready', async () => {
|
||||||
if (isDevelopment && !process.env.IS_TEST) {
|
if (isDevelopment && !process.env.IS_TEST) {
|
||||||
// Install Vue Devtools
|
// Install Vue Devtools
|
||||||
try {
|
try {
|
||||||
//await installExtension(VUEJS_DEVTOOLS)
|
//await installExtension(VUEJS_DEVTOOLS)
|
||||||
// vuedev tools for vue3
|
// vuedev tools for vue3
|
||||||
await installExtension('ljjemllljcmogpfapbkkighbhhppjdbg')
|
await installExtension('ljjemllljcmogpfapbkkighbhhppjdbg')
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('Vue Devtools failed to install:', e.toString())
|
console.error('Vue Devtools failed to install:', e.toString())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
createWindow()
|
||||||
createWindow()
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// Exit cleanly on request from parent process in development mode.
|
// Exit cleanly on request from parent process in development mode.
|
||||||
if (isDevelopment) {
|
if (isDevelopment) {
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
process.on('message', (data) => {
|
process.on('message', (data) => {
|
||||||
if (data === 'graceful-exit') {
|
if (data === 'graceful-exit') {
|
||||||
app.quit()
|
app.quit()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
process.on('SIGTERM', () => {
|
process.on('SIGTERM', () => {
|
||||||
app.quit()
|
app.quit()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -19,8 +19,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="datas">
|
<div class="datas">
|
||||||
<li v-for="cara in monthDesc" :key='cara.name'>
|
<li v-for="cara in description" :key='cara.name'>
|
||||||
<label :for='cara.name'>{{ cara.desc }}</label>
|
<label :for='cara.name'>{{ cara.label }}</label>
|
||||||
<input type="number" v-model.number="monthCopy[cara.name]" id="cara.name" class="value">
|
<input type="number" v-model.number="monthCopy[cara.name]" id="cara.name" class="value">
|
||||||
</li>
|
</li>
|
||||||
</div>
|
</div>
|
||||||
@@ -64,7 +64,7 @@ export default {
|
|||||||
'lastMonthDate': 'lastMonthDate',
|
'lastMonthDate': 'lastMonthDate',
|
||||||
}),
|
}),
|
||||||
...mapGetters('config', {
|
...mapGetters('config', {
|
||||||
'monthDesc': 'monthDesc',
|
'description': 'descEditable',
|
||||||
}),
|
}),
|
||||||
formatedDate: function () {
|
formatedDate: function () {
|
||||||
return format(this.monthDate, "MMMM YYY", {locale: frLocal} )
|
return format(this.monthDate, "MMMM YYY", {locale: frLocal} )
|
||||||
@@ -132,6 +132,10 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column-reverse;
|
flex-direction: column-reverse;
|
||||||
}
|
}
|
||||||
|
label{
|
||||||
|
text-align: right;
|
||||||
|
font-size: 0.8em;
|
||||||
|
}
|
||||||
.value {
|
.value {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
@@ -1,33 +1,30 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="month-presentation">
|
<div class="month-presentation">
|
||||||
<div class="date">
|
<div id="date">
|
||||||
<div class="month">
|
<div class="month">
|
||||||
{{ theMonth }}
|
{{ theMonth }}
|
||||||
</div>
|
</div>
|
||||||
<div class="year">
|
<div class="year">
|
||||||
{{ theYear }}
|
{{ theYear }}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button class="edit" @click="toggleEdit" v-show="!editing"> Mettre à jour </button>
|
<button class="edit" @click="toggleEdit" v-show="!editing"> Mettre à jour </button>
|
||||||
<button class="validate" @click="save" v-show="editing"> Valider </button>
|
<button class="validate" @click="save" v-show="editing"> Valider </button>
|
||||||
<button class="cancel" @click="cancel" v-show="editing"> Annuler </button>
|
<button class="cancel" @click="cancel" v-show="editing"> Annuler </button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="display">
|
<div id="display" v-show="!editing">
|
||||||
<ul v-show="!editing">
|
<div class="hightlight" v-for="cara in descHightlights" :key='cara.name'>
|
||||||
<li v-for="cara in monthDesc" :key='cara.name'>
|
<label :for='cara.name'>{{ cara.label }}</label>
|
||||||
<label :for='cara.name'>{{ cara.desc }}</label>
|
<span class="value" >{{ cara.output(TheMonth) ?? "∅"}} {{cara.unit}}</span>
|
||||||
<span class="value" >{{ TheMonth.[cara.name] ?? "∅"}} {{cara.unit}}</span>
|
</div>
|
||||||
</li>
|
</div>
|
||||||
</ul>
|
<div id="edit" v-show="editing">
|
||||||
<ul v-show="editing">
|
<div v-for="cara in descEditable" :key='cara.name' class="cara">
|
||||||
<li v-for="cara in monthDesc" :key='cara.name'>
|
<label :for='cara.name'>{{ cara.label }}</label>
|
||||||
<label :for='cara.name'>{{ cara.desc }}</label>
|
<input type="number" v-model.number="monthCopy[cara.name]" id="cara.name">
|
||||||
<input type="number" v-model.number="monthCopy[cara.name]" id="cara.name" class="value">
|
</div>
|
||||||
</li>
|
</div>
|
||||||
</ul>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -54,7 +51,8 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('config', {
|
...mapGetters('config', {
|
||||||
'monthDesc': 'monthHightlightDesc',
|
'descHightlights': 'monthHightlightDesc',
|
||||||
|
'descEditable': 'descEditable',
|
||||||
}),
|
}),
|
||||||
rawDate: function () {
|
rawDate: function () {
|
||||||
return parseISO(this.TheDate, "yyyy-MM", new Date())
|
return parseISO(this.TheDate, "yyyy-MM", new Date())
|
||||||
@@ -99,7 +97,7 @@ export default {
|
|||||||
margin: 20px;
|
margin: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.date {
|
#date {
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
border-right: 1px solid black;
|
border-right: 1px solid black;
|
||||||
@@ -108,20 +106,27 @@ export default {
|
|||||||
font-size: 2em;
|
font-size: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul {
|
#display {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: row wrap;
|
flex-flow: row wrap;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
}
|
}
|
||||||
li {
|
#display > * {
|
||||||
margin: 3px;
|
margin: 3px;
|
||||||
width: 30%;
|
width: 80px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column-reverse;
|
flex-direction: column-reverse;
|
||||||
}
|
}
|
||||||
|
label{
|
||||||
|
text-align: right;
|
||||||
|
font-size: 0.8em;
|
||||||
|
}
|
||||||
.value {
|
.value {
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
|
text-align: right;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,4 +139,8 @@ export default {
|
|||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
|
.cara {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column-reverse;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@@ -1,41 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="hightlights">
|
<div class="hightlights">
|
||||||
<div class="hightlight boxed">
|
<hightlight-sum :months="months" attribute="ca"/>
|
||||||
<ul>
|
<hightlight-sum :months="months" attribute="remuneration"/>
|
||||||
<li>{{ ca }} €</li>
|
<hightlight-sum :months="months" attribute="caPersoUntouch"/>
|
||||||
<li>CA</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="hightlight boxed">
|
|
||||||
<ul>
|
|
||||||
<li>{{ remuneration }} €</li>
|
|
||||||
<li>Rémunération</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="hightlight boxed">
|
|
||||||
<ul>
|
|
||||||
<li>{{ caPersoUntouch }} €</li>
|
|
||||||
<li>13e mois</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<revenus-chart/>
|
<revenus-chart/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import {
|
|
||||||
ca,
|
|
||||||
caPersoUntouch,
|
|
||||||
sum,
|
|
||||||
mean,
|
|
||||||
} from '../lib/months'
|
|
||||||
import RevenusChart from '../components/graphs/RevenusChart.vue'
|
import RevenusChart from '../components/graphs/RevenusChart.vue'
|
||||||
|
import hightlightSum from './hightlightSum.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'caOnPeriod',
|
name: 'caOnPeriod',
|
||||||
components: {
|
components: {
|
||||||
RevenusChart: RevenusChart,
|
RevenusChart: RevenusChart,
|
||||||
|
hightlightSum: hightlightSum,
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {}
|
return {}
|
||||||
@@ -44,11 +25,6 @@ export default {
|
|||||||
...mapGetters('travail', {
|
...mapGetters('travail', {
|
||||||
months: "months",
|
months: "months",
|
||||||
}),
|
}),
|
||||||
ca: function () {return sum(Object.values(this.months).map(a => ca(a))).toLocaleString()},
|
|
||||||
caMean: function () {return mean(Object.values(this.months).map(a => ca(a))).toLocaleString()},
|
|
||||||
remuneration: function () {return sum(Object.values(this.months).map(a => a.remuneration)).toLocaleString()},
|
|
||||||
caPersoUntouch: function () {return sum(Object.values(this.months).map(a => caPersoUntouch(a))).toLocaleString()},
|
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
},
|
},
|
||||||
|
@@ -1,39 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="hightlights">
|
<div class="hightlights">
|
||||||
<div class="hightlight boxed">
|
<hightlight-sum :months="months" attribute="caTheo"/>
|
||||||
<ul>
|
<hightlight-sum :months="months" attribute="retro"/>
|
||||||
<li>{{ caTheo }} €</li>
|
<hightlight-sum :months="months" attribute="notInvoiced"/>
|
||||||
<li>CA "séances effectuées"</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="hightlight boxed">
|
|
||||||
<ul>
|
|
||||||
<li>{{ retrocession }} €</li>
|
|
||||||
<li>Rétrocession</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="hightlight boxed">
|
|
||||||
<ul>
|
|
||||||
<li>{{ notInvoiced }} €</li>
|
|
||||||
<li>Non facturé</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<repartition-chart/>
|
<repartition-chart/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import {
|
|
||||||
sum,
|
|
||||||
notInvoiced,
|
|
||||||
} from '../lib/months'
|
|
||||||
import RepartitionChart from './graphs/RepartitionChart.vue'
|
import RepartitionChart from './graphs/RepartitionChart.vue'
|
||||||
|
import hightlightSum from './hightlightSum.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'caRepartition',
|
name: 'caRepartition',
|
||||||
components: {
|
components: {
|
||||||
RepartitionChart: RepartitionChart,
|
RepartitionChart: RepartitionChart,
|
||||||
|
hightlightSum: hightlightSum,
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {}
|
return {}
|
||||||
@@ -42,9 +25,6 @@ export default {
|
|||||||
...mapGetters('travail', {
|
...mapGetters('travail', {
|
||||||
months: "months",
|
months: "months",
|
||||||
}),
|
}),
|
||||||
caTheo: function () {return sum(Object.values(this.months).map(a => a.caTheo)).toLocaleString()},
|
|
||||||
retrocession: function () {return sum(Object.values(this.months).map(a => a.retro)).toLocaleString()},
|
|
||||||
notInvoiced: function () {return sum(Object.values(this.months).map(a => notInvoiced(a))).toLocaleString()},
|
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
},
|
},
|
||||||
|
52
src/components/hightlightSum.vue
Normal file
52
src/components/hightlightSum.vue
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<template>
|
||||||
|
<div class="hightlight boxed">
|
||||||
|
<ul>
|
||||||
|
<li>{{ sumValue }} {{ unit }}</li>
|
||||||
|
<li>{{ label }} </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
import {
|
||||||
|
sum,
|
||||||
|
} from '../lib/months'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'hightlightSum',
|
||||||
|
components: {
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
months: Object,
|
||||||
|
attribute: String,
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('config', {
|
||||||
|
descOf: "descOf",
|
||||||
|
}),
|
||||||
|
theDesc: function () {
|
||||||
|
return this.descOf(this.attribute)
|
||||||
|
},
|
||||||
|
sumValue: function () {
|
||||||
|
return sum(Object.values(this.months).map(m => this.theDesc.output(m))).toLocaleString()
|
||||||
|
},
|
||||||
|
label: function () {
|
||||||
|
return this.theDesc.label
|
||||||
|
},
|
||||||
|
unit: function () {
|
||||||
|
return this.theDesc.unit
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
@@ -1,21 +1,87 @@
|
|||||||
<template>
|
<template>
|
||||||
<h1>Sous Margot</h1>
|
|
||||||
<!--
|
|
||||||
<nav>
|
<nav>
|
||||||
<router-link to="/"> Home </router-link>
|
<h1><router-link to="/"> Sous Margot </router-link></h1>
|
||||||
<router-link to="/config"> Config </router-link>
|
<h2>
|
||||||
|
<ul id="years">
|
||||||
|
<li v-for="year in years" :key="year">
|
||||||
|
<span @click="selectYear(year)" :class="{selected_year:year==selected_year}">{{ year }}</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</h2>
|
||||||
|
<div class="nav-link">
|
||||||
|
<router-link to="/edit">
|
||||||
|
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="user-edit" class="svg-inline--fa fa-user-edit fa-w-20" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512" width='25px' height="25px">
|
||||||
|
<path fill="currentColor" d="M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h274.9c-2.4-6.8-3.4-14-2.6-21.3l6.8-60.9 1.2-11.1 7.9-7.9 77.3-77.3c-24.5-27.7-60-45.5-99.9-45.5zm45.3 145.3l-6.8 61c-1.1 10.2 7.5 18.8 17.6 17.6l60.9-6.8 137.9-137.9-71.7-71.7-137.9 137.8zM633 268.9L595.1 231c-9.3-9.3-24.5-9.3-33.8 0l-37.8 37.8-4.1 4.1 71.8 71.7 41.8-41.8c9.3-9.4 9.3-24.5 0-33.9z"></path>
|
||||||
|
</svg>
|
||||||
|
</router-link>
|
||||||
|
<router-link to="/config">
|
||||||
|
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="user-cog" class="svg-inline--fa fa-user-cog fa-w-20" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512" width='25px' height="25px">
|
||||||
|
<path fill="black" d="M610.5 373.3c2.6-14.1 2.6-28.5 0-42.6l25.8-14.9c3-1.7 4.3-5.2 3.3-8.5-6.7-21.6-18.2-41.2-33.2-57.4-2.3-2.5-6-3.1-9-1.4l-25.8 14.9c-10.9-9.3-23.4-16.5-36.9-21.3v-29.8c0-3.4-2.4-6.4-5.7-7.1-22.3-5-45-4.8-66.2 0-3.3.7-5.7 3.7-5.7 7.1v29.8c-13.5 4.8-26 12-36.9 21.3l-25.8-14.9c-2.9-1.7-6.7-1.1-9 1.4-15 16.2-26.5 35.8-33.2 57.4-1 3.3.4 6.8 3.3 8.5l25.8 14.9c-2.6 14.1-2.6 28.5 0 42.6l-25.8 14.9c-3 1.7-4.3 5.2-3.3 8.5 6.7 21.6 18.2 41.1 33.2 57.4 2.3 2.5 6 3.1 9 1.4l25.8-14.9c10.9 9.3 23.4 16.5 36.9 21.3v29.8c0 3.4 2.4 6.4 5.7 7.1 22.3 5 45 4.8 66.2 0 3.3-.7 5.7-3.7 5.7-7.1v-29.8c13.5-4.8 26-12 36.9-21.3l25.8 14.9c2.9 1.7 6.7 1.1 9-1.4 15-16.2 26.5-35.8 33.2-57.4 1-3.3-.4-6.8-3.3-8.5l-25.8-14.9zM496 400.5c-26.8 0-48.5-21.8-48.5-48.5s21.8-48.5 48.5-48.5 48.5 21.8 48.5 48.5-21.7 48.5-48.5 48.5zM224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm201.2 226.5c-2.3-1.2-4.6-2.6-6.8-3.9l-7.9 4.6c-6 3.4-12.8 5.3-19.6 5.3-10.9 0-21.4-4.6-28.9-12.6-18.3-19.8-32.3-43.9-40.2-69.6-5.5-17.7 1.9-36.4 17.9-45.7l7.9-4.6c-.1-2.6-.1-5.2 0-7.8l-7.9-4.6c-16-9.2-23.4-28-17.9-45.7.9-2.9 2.2-5.8 3.2-8.7-3.8-.3-7.5-1.2-11.4-1.2h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c10.1 0 19.5-3.2 27.2-8.5-1.2-3.8-2-7.7-2-11.8v-9.2z"></path>
|
||||||
|
</svg>
|
||||||
|
</router-link>
|
||||||
|
|
||||||
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
-->
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
import { mapActions } from 'vuex'
|
||||||
|
import { getYear } from 'date-fns'
|
||||||
|
const today = new Date()
|
||||||
export default {
|
export default {
|
||||||
name: 'Nav',
|
name: 'Nav',
|
||||||
props: {
|
data () {
|
||||||
|
return {
|
||||||
|
current_year: getYear(today),
|
||||||
|
selected_year: getYear(today),
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters({
|
||||||
|
available_years: "travail/years",
|
||||||
|
}),
|
||||||
|
years: function () {
|
||||||
|
return [...this.available_years, this.current_year].filter((v, i, a) => a.indexOf(v) === i)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
...mapActions('travail', {
|
||||||
|
'setRange': 'setRange',
|
||||||
|
}),
|
||||||
|
selectYear: function (year) {
|
||||||
|
this.selected_year=year
|
||||||
|
this.setRange({
|
||||||
|
start: `${this.current_year}-01`,
|
||||||
|
end: `${this.current_year}-12`
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
|
#years {
|
||||||
|
list-style-type: none;
|
||||||
|
padding: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-flow: row wrap;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
}
|
||||||
|
#years > * {
|
||||||
|
margin: 3px;
|
||||||
|
width: 80px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column-reverse;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selected_year {
|
||||||
|
font-size: 1.5em;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@@ -2,6 +2,7 @@ import { createRouter, createWebHistory } from 'vue-router'
|
|||||||
|
|
||||||
import Home from "@/views/home.vue"
|
import Home from "@/views/home.vue"
|
||||||
import Config from "@/views/config.vue"
|
import Config from "@/views/config.vue"
|
||||||
|
import Edit from "@/views/edit.vue"
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
@@ -9,6 +10,11 @@ const routes = [
|
|||||||
name: 'home',
|
name: 'home',
|
||||||
component: Home
|
component: Home
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/edit',
|
||||||
|
name: 'edit',
|
||||||
|
component: Edit
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/config',
|
path: '/config',
|
||||||
name: 'config',
|
name: 'config',
|
||||||
|
@@ -1,6 +1,13 @@
|
|||||||
import path from 'path'
|
import path from 'path'
|
||||||
import Papa from 'papaparse'
|
import Papa from 'papaparse'
|
||||||
import { writeFile } from 'fs'
|
import { writeFile } from 'fs'
|
||||||
|
import {
|
||||||
|
ca,
|
||||||
|
notInvoiced,
|
||||||
|
caPro,
|
||||||
|
caPerso,
|
||||||
|
caPersoUntouch,
|
||||||
|
} from '../../lib/months.js'
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
namespaced: true,
|
namespaced: true,
|
||||||
@@ -10,62 +17,113 @@ const config = {
|
|||||||
userDir: './userDir/',
|
userDir: './userDir/',
|
||||||
dataFile: 'datas.csv',
|
dataFile: 'datas.csv',
|
||||||
caProPercentage: 0.5,
|
caProPercentage: 0.5,
|
||||||
monthDesc : [
|
descAll : [
|
||||||
{
|
{
|
||||||
color: '',
|
|
||||||
desc: 'CA "scéances effectuées"',
|
|
||||||
type: 'base',
|
|
||||||
name: 'caTheo',
|
name: 'caTheo',
|
||||||
unit: '€',
|
|
||||||
hightlight: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
color: '',
|
color: '',
|
||||||
desc: 'CA "Séances facturées"',
|
label: 'CA "scéances effectuées"',
|
||||||
type: 'base',
|
type: 'editable',
|
||||||
name: 'caRetro',
|
|
||||||
unit: '€',
|
unit: '€',
|
||||||
hightlight: false,
|
hightlight: false,
|
||||||
|
output: month => month.caTheo,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
name: 'caRetro',
|
||||||
color: '',
|
color: '',
|
||||||
desc: 'CA "Séances facturées" réactualisé',
|
label: 'CA "Séances facturées"',
|
||||||
type: 'base',
|
type: 'editable',
|
||||||
name: 'caReact',
|
|
||||||
unit: '€',
|
unit: '€',
|
||||||
hightlight: true,
|
hightlight: false,
|
||||||
|
output: month => month.caRetro,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
name: 'caReact',
|
||||||
color: '',
|
color: '',
|
||||||
desc: 'Nombre de séances effectuées',
|
label: 'CA "Séances facturées" réactualisé',
|
||||||
type: 'base',
|
type: 'editable',
|
||||||
|
unit: '€',
|
||||||
|
hightlight: false,
|
||||||
|
output: month => month.caReact,
|
||||||
|
},
|
||||||
|
{
|
||||||
name: 'sessionQty',
|
name: 'sessionQty',
|
||||||
|
color: '',
|
||||||
|
label: 'Nombre de séances effectuées',
|
||||||
unit: '',
|
unit: '',
|
||||||
hightlight: false,
|
hightlight: false,
|
||||||
|
output: month => month.sessionQty,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: '',
|
|
||||||
desc: 'Montant de la rétrocession',
|
|
||||||
type: 'base',
|
|
||||||
name: 'retro',
|
name: 'retro',
|
||||||
|
color: '',
|
||||||
|
label: 'Montant de la rétrocession',
|
||||||
|
type: 'editable',
|
||||||
unit: '€',
|
unit: '€',
|
||||||
hightlight: false,
|
hightlight: false,
|
||||||
|
output: month => month.retro,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: '',
|
|
||||||
desc: 'Rémuneration',
|
|
||||||
type: 'base',
|
|
||||||
name: 'remuneration',
|
name: 'remuneration',
|
||||||
|
color: '',
|
||||||
|
label: 'Rémuneration',
|
||||||
|
type: 'editable',
|
||||||
unit: '€',
|
unit: '€',
|
||||||
hightlight: true,
|
hightlight: true,
|
||||||
|
output: month => month.remuneration,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: '',
|
|
||||||
desc: 'Pourcentage du CA pour la partie pro',
|
|
||||||
type: 'base',
|
|
||||||
name: 'proPercentage',
|
name: 'proPercentage',
|
||||||
|
color: '',
|
||||||
|
label: 'Pourcentage du CA pour la partie pro',
|
||||||
|
type: 'editable',
|
||||||
unit: '%',
|
unit: '%',
|
||||||
hightlight: false,
|
hightlight: false,
|
||||||
|
output: month => month.proPercentage,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'ca',
|
||||||
|
color: '',
|
||||||
|
label: 'CA',
|
||||||
|
type: 'compute',
|
||||||
|
unit: '€',
|
||||||
|
hightlight: true,
|
||||||
|
output: month => ca(month),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'notInvoiced',
|
||||||
|
color: '',
|
||||||
|
label: 'Non facturé',
|
||||||
|
type: 'compute',
|
||||||
|
unit: '€',
|
||||||
|
hightlight: true,
|
||||||
|
output: month => notInvoiced(month),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'caPro',
|
||||||
|
color: '',
|
||||||
|
label: 'CA pour le partie pro',
|
||||||
|
type: 'compute',
|
||||||
|
unit: '€',
|
||||||
|
hightlight: false,
|
||||||
|
output: month => caPro(month),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'caPerso',
|
||||||
|
color: '',
|
||||||
|
label: 'CA destiné à la rémuneration',
|
||||||
|
type: 'compute',
|
||||||
|
unit: '€',
|
||||||
|
hightlight: false,
|
||||||
|
output: month => caPerso(month),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'caPersoUntouch',
|
||||||
|
color: '',
|
||||||
|
label: 'Banque 13e mois',
|
||||||
|
type: 'compute',
|
||||||
|
unit: '€',
|
||||||
|
hightlight: false,
|
||||||
|
output: month => caPersoUntouch(month),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
@@ -73,8 +131,22 @@ const config = {
|
|||||||
getters: {
|
getters: {
|
||||||
userDir (state) { return state.userDir },
|
userDir (state) { return state.userDir },
|
||||||
dataFilePath (state) { return path.join(state.userDir, state.dataFile) },
|
dataFilePath (state) { return path.join(state.userDir, state.dataFile) },
|
||||||
monthDesc (state) { return state.monthDesc },
|
descAll (state) {
|
||||||
monthHightlightDesc (state) { return state.monthDesc.filter(a => a.hightlight) },
|
// All description of attributes for months
|
||||||
|
return state.descAll
|
||||||
|
},
|
||||||
|
descEditable (state) {
|
||||||
|
// All description of attributes for months that are editable
|
||||||
|
return state.descAll.filter(d => d.type == 'editable')
|
||||||
|
},
|
||||||
|
descComputed (state) {
|
||||||
|
// All description of attributes for months that are computed
|
||||||
|
return state.descAll.filter(d => d.type != 'editable')
|
||||||
|
},
|
||||||
|
descOf: (state) => (desc) => {
|
||||||
|
return state.descAll.filter(d => d.name == desc)[0]
|
||||||
|
},
|
||||||
|
monthHightlightDesc (state) { return state.descAll.filter(a => a.hightlight) },
|
||||||
caProPercentage (state) { return state.caProPercentage },
|
caProPercentage (state) { return state.caProPercentage },
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
import { readFile } from 'fs'
|
import { readFile } from 'fs'
|
||||||
import Papa from 'papaparse'
|
import Papa from 'papaparse'
|
||||||
|
import { getYear } from 'date-fns'
|
||||||
|
|
||||||
|
const today = new Date()
|
||||||
|
|
||||||
const travail = {
|
const travail = {
|
||||||
namespaced: true,
|
namespaced: true,
|
||||||
@@ -18,8 +20,8 @@ const travail = {
|
|||||||
months: {
|
months: {
|
||||||
},
|
},
|
||||||
range: {
|
range: {
|
||||||
start: "2021-01",
|
start: `${getYear(today)}-01`,
|
||||||
end: "2021-08",
|
end: `${getYear(today)}-12`,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -53,12 +55,17 @@ const travail = {
|
|||||||
return state.months
|
return state.months
|
||||||
},
|
},
|
||||||
getMonth: (state) => (date) => {
|
getMonth: (state) => (date) => {
|
||||||
|
// Get a month by its date
|
||||||
return state.months[date]
|
return state.months[date]
|
||||||
},
|
},
|
||||||
count: (state, getters) => {
|
count: (state, getters) => {
|
||||||
// Amount of mounts
|
// Amount of mounts
|
||||||
return Object.keys(getters.months).length
|
return Object.keys(getters.months).length
|
||||||
},
|
},
|
||||||
|
years: (state) => {
|
||||||
|
// list of years with data
|
||||||
|
return Object.keys(state.months).map(k => k.slice(0,4)).filter((v, i, a) => a.indexOf(v) === i)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
cleanMonths (state) {
|
cleanMonths (state) {
|
||||||
|
120
src/style.css
120
src/style.css
@@ -1,46 +1,68 @@
|
|||||||
body {
|
body {
|
||||||
background-color: whitesmoke;
|
background-color: whitesmoke;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
padding: 0 20px;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
nav h1 {
|
||||||
|
font-size: 2em;
|
||||||
|
border-bottom: 1px solid #000;
|
||||||
|
}
|
||||||
|
nav a {
|
||||||
|
color: black;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
margin: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
color: black;
|
color: black;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
box-shadow: 1px 1px 2px gray;
|
box-shadow: 1px 1px 2px gray;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
width: auto;
|
width: auto;
|
||||||
transition: all 0.2s ease-out;
|
transition: all 0.2s ease-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
button:hover {
|
button:hover {
|
||||||
background-color: black;
|
background-color: black;
|
||||||
color: white;
|
color: white;
|
||||||
transition: all 0.2s ease-out;
|
transition: all 0.2s ease-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.validate {
|
.validate {
|
||||||
border: 2px solid green;
|
border: 2px solid green;
|
||||||
color: green;
|
color: green;
|
||||||
}
|
}
|
||||||
.validate:hover {
|
.validate:hover {
|
||||||
background-color: green;
|
background-color: green;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
.cancel {
|
.cancel {
|
||||||
border: 2px solid red;
|
border: 2px solid red;
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
.cancel:hover {
|
.cancel:hover {
|
||||||
background-color: red;
|
background-color: red;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
.edit {
|
.edit {
|
||||||
border: 2px solid orange;
|
border: 2px solid orange;
|
||||||
color: orange;
|
color: orange;
|
||||||
}
|
}
|
||||||
.edit:hover {
|
.edit:hover {
|
||||||
background-color: orange;
|
background-color: orange;
|
||||||
@@ -48,41 +70,41 @@ button:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.boxed {
|
.boxed {
|
||||||
box-shadow: 2px 2px 5px gray;
|
box-shadow: 2px 2px 5px gray;
|
||||||
border-left: 1rem solid black;
|
border-left: 1rem solid black;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.boxed-green {
|
.boxed-green {
|
||||||
box-shadow: 2px 2px 5px gray;
|
box-shadow: 2px 2px 5px gray;
|
||||||
border-left: 1rem solid green;
|
border-left: 1rem solid green;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hightlights {
|
.hightlights {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(3, 1fr);
|
grid-template-columns: repeat(3, 1fr);
|
||||||
grid-gap: 20px;
|
grid-gap: 20px;
|
||||||
}
|
}
|
||||||
.hightlight > ul{
|
.hightlight > ul {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: column wrap;
|
flex-flow: column wrap;
|
||||||
padding-inline-start: 0;
|
padding-inline-start: 0;
|
||||||
margin-block-start: 0;
|
margin-block-start: 0;
|
||||||
margin-block-end: 0;
|
margin-block-end: 0;
|
||||||
}
|
}
|
||||||
.hightlight > ul > li {
|
.hightlight > ul > li {
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
flex-direction: column-reverse;
|
flex-direction: column-reverse;
|
||||||
}
|
}
|
||||||
.hightlight > ul :first-child{
|
.hightlight > ul :first-child {
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.hightlight > ul :last-child{
|
.hightlight > ul :last-child {
|
||||||
text-align: end;
|
text-align: end;
|
||||||
}
|
}
|
||||||
|
@@ -1,3 +1,40 @@
|
|||||||
<template>
|
<template>
|
||||||
<h1>Config</h1>
|
<h1>Config</h1>
|
||||||
|
|
||||||
|
<h2> Données </h2>
|
||||||
|
<h3>Données éditables</h3>
|
||||||
|
<ul>
|
||||||
|
<li v-for="param in descEditable" :key='param.name'>
|
||||||
|
{{ param }}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<h3>Données calculées</h3>
|
||||||
|
<ul>
|
||||||
|
<li v-for="param in descComputed" :key='param.name'>
|
||||||
|
{{ param }}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
export default {
|
||||||
|
name: 'config',
|
||||||
|
|
||||||
|
data () {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('config', {
|
||||||
|
'descEditable': 'descEditable',
|
||||||
|
'descComputed': 'descComputed',
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
22
src/views/edit.vue
Normal file
22
src/views/edit.vue
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<template>
|
||||||
|
<h1>Edition</h1>
|
||||||
|
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'edit',
|
||||||
|
|
||||||
|
data () {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
@@ -1,14 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<section id="months">
|
<section id="months">
|
||||||
<create-month/>
|
<create-month />
|
||||||
<months-list/>
|
<months-list />
|
||||||
</section>
|
</section>
|
||||||
<section id="stats">
|
<section id="stats">
|
||||||
<ca-on-period/>
|
<ca-on-period />
|
||||||
<ca-repartition/>
|
<ca-repartition />
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -43,16 +43,15 @@ export default {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
#content {
|
#content {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: minmax(580px, 2fr) minmax(450px, 1fr);
|
grid-template-columns: minmax(580px, 2fr) minmax(450px, 1fr);
|
||||||
grid-template-areas:
|
grid-template-areas: "stats months";
|
||||||
"stats months";
|
gap: 1em;
|
||||||
gap: 1em;
|
|
||||||
}
|
}
|
||||||
#stats {
|
#stats {
|
||||||
grid-area: stats;
|
grid-area: stats;
|
||||||
}
|
}
|
||||||
#months {
|
#months {
|
||||||
grid-area: months;
|
grid-area: months;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Reference in New Issue
Block a user