mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 13:24:24 +00:00
progress on setup and account view
This commit is contained in:
2
notes.md
2
notes.md
@@ -11,9 +11,11 @@
|
||||
|
||||
|
||||
- Update files to import when deploying for included json files instead of secret.json files
|
||||
- Also remove /test/ routes
|
||||
|
||||
- Fix text field overflow (text too big for box)
|
||||
- Other optimization for seat plan editor
|
||||
- Fix diagonal stand component
|
||||
|
||||
|
||||
- FUTURE: Implement Permission system
|
||||
|
||||
@@ -52,17 +52,19 @@ const settings = JSON.parse( fs.readFileSync( path.join( __dirname + '/config/se
|
||||
// Vue SSR and gets its support files (e.g. CSS and JS files) from
|
||||
// the /home/supportFiles/:file route plus its assets from the /otherAssets/:file
|
||||
// route).
|
||||
if ( settings.init ) {
|
||||
if ( settings.setupDone ) {
|
||||
app.get( '/', ( req, res ) => {
|
||||
res.sendFile( path.join( __dirname + '/ui/home/active/en/index.html' ) );
|
||||
} );
|
||||
}
|
||||
|
||||
// TODO: If no init, initialize DB.
|
||||
|
||||
|
||||
// Set up static routes for static file serving (performance wise not
|
||||
// that good, but way easier to set up)
|
||||
console.log( '[ Server ] Setting up static routes' );
|
||||
if ( settings.init ) {
|
||||
if ( settings.setupDone ) {
|
||||
app.use( express.static( 'webapp/main/dist' ) );
|
||||
} else {
|
||||
app.use( express.static( 'webapp/setup/dist' ) );
|
||||
@@ -86,7 +88,7 @@ app.use( cookieParser() );
|
||||
let file = path.join( __dirname + '/webapp/main/dist/index.html' );
|
||||
|
||||
console.log( '[ Server ] loading backend components' );
|
||||
if ( settings.init ) {
|
||||
if ( settings.setupDone ) {
|
||||
require( './backend/helperRoutes.js' )( app, settings ); // Helper routes
|
||||
require( './admin/adminRoutes.js' )( app, settings ); // admin routes
|
||||
require( './admin/adminAPIRoutes.js' )( app, settings ); // admin api routes
|
||||
|
||||
@@ -28,7 +28,7 @@ module.exports = ( app, settings ) => {
|
||||
if ( data[ 0 ] ) {
|
||||
let dat = {};
|
||||
for ( let element in data[ 0 ] ) {
|
||||
if ( element === 'pass' ) {
|
||||
if ( element !== 'pass' ) {
|
||||
dat[ element ] = data[ 0 ][ element ];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1,17 @@
|
||||
{"init":false,"twoFA":"enforce","setupKey":"hello world","twoFAMode":"enhanced","db":"json","payments":"stripe","name":"libreevent","yourDomain":"http://localhost:8080","mailSender":"libreevent <info@libreevent.janishutz.com>","maxTickets":10,"currency":"CHF","gcInterval":300,"ticketTimeout":900,"startPage":"default","version":"1.0.0"}
|
||||
{
|
||||
"init":false,
|
||||
"setupDone": true,
|
||||
"twoFA":"enforce",
|
||||
"twoFAMode":"enhanced",
|
||||
"db":"json",
|
||||
"payments":"stripe",
|
||||
"name":"libreevent",
|
||||
"yourDomain":"http://localhost:8080",
|
||||
"mailSender":"libreevent <info@libreevent.janishutz.com>",
|
||||
"maxTickets":10,
|
||||
"currency":"CHF",
|
||||
"gcInterval":300,
|
||||
"ticketTimeout":900,
|
||||
"startPage":"default",
|
||||
"version":"1.0.0"
|
||||
}
|
||||
@@ -11,7 +11,16 @@
|
||||
{{ accountData.email }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Name
|
||||
</td>
|
||||
<td>
|
||||
{{ accountData.first_name }} {{ accountData.name }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<button>Resend confirmation email</button>
|
||||
<notifications ref="notification" location="topright" size="bigger"></notifications>
|
||||
<popups ref="popups" size="big" @data="data => { savePwd( data ) }"></popups>
|
||||
</div>
|
||||
@@ -44,7 +53,7 @@
|
||||
...mapStores( useUserStore )
|
||||
},
|
||||
created () {
|
||||
// TODO: Also get all orders of user (using join functions)
|
||||
// TODO: FUTURE Also get all orders of user (using join functions)
|
||||
fetch( localStorage.getItem( 'url' ) + '/user/details' ).then( res => {
|
||||
if ( res.status === 200 ) {
|
||||
res.json().then( data => {
|
||||
|
||||
@@ -169,6 +169,7 @@
|
||||
}
|
||||
},
|
||||
proceed () {
|
||||
// TODO: Perform checks
|
||||
this.backendStore.addVisitedSetupPages( 'complete', true );
|
||||
this.$router.push( 'complete' );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user