mirror of
https://github.com/frappe/books.git
synced 2024-11-08 23:00:56 +00:00
add new model, account
This commit is contained in:
parent
5c15ed23f0
commit
55e4a350e3
13
index.js
13
index.js
@ -7,13 +7,16 @@ client.start({
|
|||||||
server: 'localhost:8000',
|
server: 'localhost:8000',
|
||||||
container: document.querySelector('.wrapper'),
|
container: document.querySelector('.wrapper'),
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
const todo = require('frappejs/models/doctype/todo/todo.js');
|
frappe.todo_module = require('frappejs/models/doctype/todo/todo.js');
|
||||||
frappe.init_controller('todo', todo);
|
frappe.account_module = require('./models/doctype/account/account.js');
|
||||||
|
|
||||||
frappe.desk.add_sidebar_item('Home', '#');
|
frappe.init_controller('account', frappe.account_module);
|
||||||
frappe.desk.add_sidebar_item('New ToDo', '#new/todo');
|
frappe.init_controller('todo', frappe.todo_module);
|
||||||
|
|
||||||
frappe.router.default = '/list/todo';
|
frappe.desk.add_sidebar_item('ToDo', '#list/todo');
|
||||||
|
frappe.desk.add_sidebar_item('Accounts', '#list/account');
|
||||||
|
|
||||||
|
frappe.router.default = '#list/todo';
|
||||||
|
|
||||||
frappe.router.show(window.location.hash);
|
frappe.router.show(window.location.hash);
|
||||||
});
|
});
|
306
js/bundle.js
306
js/bundle.js
File diff suppressed because one or more lines are too long
@ -6,7 +6,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"autoprefixer": "^7.2.4",
|
"autoprefixer": "^7.2.4",
|
||||||
"body-parser": "^1.18.2",
|
"body-parser": "^1.18.2",
|
||||||
"bootstrap": "4.0.0-beta.3",
|
"bootstrap": "^4.0.0",
|
||||||
"css-loader": "^0.28.8",
|
"css-loader": "^0.28.8",
|
||||||
"express": "^4.16.2",
|
"express": "^4.16.2",
|
||||||
"node-fetch": "^1.7.3",
|
"node-fetch": "^1.7.3",
|
||||||
@ -19,5 +19,8 @@
|
|||||||
"walk": "^2.3.9",
|
"walk": "^2.3.9",
|
||||||
"webpack": "^3.10.0",
|
"webpack": "^3.10.0",
|
||||||
"webpack-dev-server": "^2.9.7"
|
"webpack-dev-server": "^2.9.7"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"extract-text-webpack-plugin": "^3.0.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
const server = require('frappejs/server');
|
const server = require('frappejs/server');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
server.start({
|
server.start({
|
||||||
backend: 'sqlite',
|
backend: 'sqlite',
|
||||||
connection_params: {db_path: 'test.db'},
|
connection_params: {db_path: 'test.db'},
|
||||||
static: './'
|
static: './',
|
||||||
|
models_path: path.resolve(__dirname, './models')
|
||||||
});
|
});
|
@ -11,29 +11,26 @@ module.exports = {
|
|||||||
rules: [{
|
rules: [{
|
||||||
test: /\.scss$/,
|
test: /\.scss$/,
|
||||||
use: [
|
use: [
|
||||||
{
|
{
|
||||||
loader: "style-loader" // creates style nodes from JS strings
|
loader: 'style-loader'
|
||||||
},
|
|
||||||
{
|
|
||||||
loader: "css-loader" // translates CSS into CommonJS
|
|
||||||
},
|
|
||||||
{
|
|
||||||
loader: 'postcss-loader', // Run post css actions
|
|
||||||
options: {
|
|
||||||
plugins: function () { // post css plugins, can be exported to postcss.config.js
|
|
||||||
return [
|
|
||||||
require('precss'),
|
|
||||||
require('autoprefixer')
|
|
||||||
];
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
{
|
||||||
{
|
loader: 'postcss-loader', // Run post css actions
|
||||||
loader: "sass-loader", // compiles Sass to CSS
|
options: {
|
||||||
options: {
|
plugins: function () { // post css plugins, can be exported to postcss.config.js
|
||||||
includePaths: ["node_modules", "./client/scss"]
|
return [
|
||||||
}
|
require('precss'),
|
||||||
}]
|
require('autoprefixer')
|
||||||
|
];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
loader: "sass-loader", // compiles Sass to CSS
|
||||||
|
options: {
|
||||||
|
includePaths: ["node_modules", "./client/scss"]
|
||||||
|
}
|
||||||
|
}]
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
};
|
};
|
17
yarn.lock
17
yarn.lock
@ -213,7 +213,7 @@ async@^1.5.2:
|
|||||||
version "1.5.2"
|
version "1.5.2"
|
||||||
resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
|
resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
|
||||||
|
|
||||||
async@^2.1.2, async@^2.1.5:
|
async@^2.1.2, async@^2.1.5, async@^2.4.1:
|
||||||
version "2.6.0"
|
version "2.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4"
|
resolved "https://registry.yarnpkg.com/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4"
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -369,9 +369,9 @@ boom@5.x.x:
|
|||||||
dependencies:
|
dependencies:
|
||||||
hoek "4.x.x"
|
hoek "4.x.x"
|
||||||
|
|
||||||
bootstrap@4.0.0-beta.3:
|
bootstrap@^4.0.0:
|
||||||
version "4.0.0-beta.3"
|
version "4.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.0.0-beta.3.tgz#60f0660bc3d121176514b361f6f83201c7ff8874"
|
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.0.0.tgz#ceb03842c145fcc1b9b4e15da2a05656ba68469a"
|
||||||
|
|
||||||
brace-expansion@^1.1.7:
|
brace-expansion@^1.1.7:
|
||||||
version "1.1.8"
|
version "1.1.8"
|
||||||
@ -1445,6 +1445,15 @@ extglob@^2.0.2:
|
|||||||
snapdragon "^0.8.1"
|
snapdragon "^0.8.1"
|
||||||
to-regex "^3.0.1"
|
to-regex "^3.0.1"
|
||||||
|
|
||||||
|
extract-text-webpack-plugin@^3.0.2:
|
||||||
|
version "3.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/extract-text-webpack-plugin/-/extract-text-webpack-plugin-3.0.2.tgz#5f043eaa02f9750a9258b78c0a6e0dc1408fb2f7"
|
||||||
|
dependencies:
|
||||||
|
async "^2.4.1"
|
||||||
|
loader-utils "^1.1.0"
|
||||||
|
schema-utils "^0.3.0"
|
||||||
|
webpack-sources "^1.0.1"
|
||||||
|
|
||||||
extsprintf@1.3.0:
|
extsprintf@1.3.0:
|
||||||
version "1.3.0"
|
version "1.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05"
|
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05"
|
||||||
|
Loading…
Reference in New Issue
Block a user