Skip to content

Commit

Permalink
version 0.2.0-alpha1
Browse files Browse the repository at this point in the history
  • Loading branch information
TomaszPilch committed Dec 10, 2020
1 parent d0578b2 commit 4d7b7f6
Show file tree
Hide file tree
Showing 9 changed files with 464 additions and 14 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bhe-be-ui-v2",
"version": "0.1.0",
"version": "0.2.0-alpha1",
"private": true,
"scripts": {
"dev": "node server.js",
Expand All @@ -10,7 +10,7 @@
"test:watch": "jest --watch"
},
"dependencies": {
"@bheui/components": "^1.0.0-alpha9",
"@bheui/components": "1.0.0-alpha12",
"@bheui/server-functions": "^0.1.2",
"@fluentui/react": "^7.153.3",
"@uifabric/experiments": "^7.36.19",
Expand Down
15 changes: 14 additions & 1 deletion public/static/defaultLocales/en/common.json
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
{"errorCodes":{"SOMETHING_WRONG":"Something went wrong, try it again later.","BAD_EMAIL":"Incorrect email.","BAD_PASSWORD":"Incorrect password.","MISSING_HELPER_ACTIONS":"This input needs helper actions!"},"notifications":{"SUCCESSFULLY_SAVED_MESSAGE":"Successfully saved","SUCCESSFULLY_SAVED_TITLE":"Saved","ITEMS_SUCCESSFULLY_DELETED_MESSAGE":"Items successfully deleted","ITEMS_SUCCESSFULLY_DELETED_TITLE":"Deleted"}}
{
"errorCodes": {
"SOMETHING_WRONG": "Something went wrong, try it again later.",
"BAD_EMAIL": "Incorrect email.",
"BAD_PASSWORD": "Incorrect password.",
"MISSING_HELPER_ACTIONS": "This input needs helper actions!"
},
"notifications": {
"SUCCESSFULLY_SAVED_MESSAGE": "Successfully saved",
"SUCCESSFULLY_SAVED_TITLE": "Saved",
"ITEMS_SUCCESSFULLY_DELETED_MESSAGE": "Items successfully deleted",
"ITEMS_SUCCESSFULLY_DELETED_TITLE": "Deleted"
}
}
417 changes: 416 additions & 1 deletion public/static/defaultLocales/en/modules.json

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions scripts/postlink.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const { exec } = require('child_process')

const runCommand = (cmd) => {
exec(cmd, (e, stdout, stderr) => {
console.log(e)
console.log(stdout)
console.log(stderr)
})
}

runCommand('cd node_modules/react & yarn unlink')
runCommand('cd node_modules/react-redux & yarn unlink')
runCommand('cd node_modules/next & yarn unlink')
13 changes: 13 additions & 0 deletions scripts/prelink.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const { exec } = require('child_process')

const runCommand = (cmd) => {
exec(cmd, (e, stdout, stderr) => {
console.log(e)
console.log(stdout)
console.log(stderr)
})
}

runCommand('cd node_modules/react & yarn link')
runCommand('cd node_modules/react-redux & yarn link')
runCommand('cd node_modules/next & yarn link')
4 changes: 1 addition & 3 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const app = next({ dev })
const handle = app.getRequestHandler()

const renderPageOrContinue = (req, res, nextCl) => {
console.log(req.path)
if (req.path.includes('_next') || req.path.includes('api/')) {
return nextCl()
}
Expand All @@ -24,8 +23,7 @@ const renderPageOrContinue = (req, res, nextCl) => {
} else if (req.params.module) {
query.page = '/[module]'
}
console.log(query)
return app.render(req, res, req.params.page, query)
return app.render(req, res, req.path, query)
}

app.prepare().then(() => {
Expand Down
1 change: 0 additions & 1 deletion src/containers/ListContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ type Props = {
class ListContainer extends React.Component<Props, State> {
render() {
const { changeRedirectUrl, module, navigationItem, rights, settings, t } = this.props
console.log(this.props)
return (
<div className="list-container-wrapper">
<div className="container">
Expand Down
3 changes: 1 addition & 2 deletions src/containers/RootContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class RootScreen extends React.Component<Props, null> {
let redirectPath = null
let redirectPathAs = null
if ((!token || shouldReloadToken) && router.pathname !== '/login') {
redirectPath = 'login'
redirectPath = '/login'
redirectPathAs = `/login?redirectTo=${window.location.pathname}`
} else if (token && router.pathname === '/login') {
const urlParams = new URLSearchParams(window.location.search)
Expand Down Expand Up @@ -115,7 +115,6 @@ class RootScreen extends React.Component<Props, null> {

render() {
const { children, navigation, presentationId, presentationIds, router, selectedGroup, t, userGroups } = this.props
console.log(this.props)
return (
<div className="app-body">
<ToastContainer ref={this.toastrContainer} className="toast-top-right" />
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -464,10 +464,10 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==

"@bheui/components@^1.0.0-alpha9":
version "1.0.0-alpha9"
resolved "https://registry.yarnpkg.com/@bheui/components/-/components-1.0.0-alpha9.tgz#fb72af72a1b966bd8fcecceaf6d28a83e2224508"
integrity sha512-pt2ScASFqO8+IHOvGAyeyaPwajY00QPqqUqe1zWYv7UJKMmvAFla9Ki09MDbe4EZ93q5kWcqPCWoEKEU0Qz81A==
"@bheui/[email protected]alpha12":
version "1.0.0-alpha12"
resolved "https://registry.yarnpkg.com/@bheui/components/-/components-1.0.0-alpha12.tgz#5778267bf121f5072194b23aaf2a21ce144a7de9"
integrity sha512-k9d6FzgVjnB6WlKBDGXWXMIhiSP7gwvVO8TlDui51SeIHRaNA7aXzh4CDCGhxzIOKYiZuEaTnNizcqoHCMC/fg==
dependencies:
"@uppy/core" "^1.14.0"
"@uppy/react" "^1.10.10"
Expand Down

0 comments on commit 4d7b7f6

Please sign in to comment.