Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
hotoa committed Sep 10, 2019
2 parents f4ae899 + 87834ef commit 2950847
Show file tree
Hide file tree
Showing 232 changed files with 28,532 additions and 3,921 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

**/.vscode/launch.*

**/yarn.lock
settings.yml


Expand Down
16 changes: 5 additions & 11 deletions apps/contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"private": true,
"name": "@steedos-app/steedos-contracts-app",
"version": "1.0.0",
"version": "1.5.5",
"description": "contract-management-system",
"main": "steedos-app/index.js",
"scripts": {
Expand All @@ -14,19 +15,12 @@
"author": "Jack Zhuang",
"license": "ISC",
"dependencies": {
"@steedos/meteor-bundle-runner": "^1.1.6",
"@steedos/objectql": "^0.0.11",
"@steedos/meteor-bundle-runner": "^1.5.1",
"@steedos/objectql": "^1.5.5",
"steedos-server": "^1.2.5"
},
"devDependencies": {},
"bugs": {
"url": "https://github.com/steedos/steedos-contracts-app/issues"
},
"homepage": "https://github.com/steedos/steedos-contracts-app#readme",
"resolutions": {
"graphql": "^14.1.1",
"@steedos/objectql": "^0.0.11",
"@steedos/core": "^1.1.17",
"@steedos/auth": "^1.0.4"
}
"homepage": "https://github.com/steedos/steedos-contracts-app#readme"
}
12 changes: 6 additions & 6 deletions apps/crm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"private": true,
"name": "@steedos/app-contracts",
"version": "1.0.0",
"version": "1.5.5",
"description": "contract-management-system",
"main": "index.js",
"scripts": {
Expand All @@ -15,13 +16,12 @@
"author": "Jack Zhuang",
"license": "ISC",
"dependencies": {
"@steedos/core": "^0.0.6",
"@steedos/meteor-bundle-runner": "^1.1.4",
"@steedos/standard-objects": "^0.0.1",
"@steedos/cli": "^1.1.5",
"@steedos/core": "^1.5.5",
"@steedos/meteor-bundle-runner": "^1.5.1",
"@steedos/standard-objects": "^1.5.5",
"steedos-cli": "^1.5.1",
"steedos-server": "^1.0.9"
},
"devDependencies": {},
"bugs": {
"url": "https://github.com/steedos/steedos-contracts-app/issues"
},
Expand Down
13 changes: 4 additions & 9 deletions apps/meeting/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"private": true,
"name": "@steedos/app-meeting",
"version": "1.0.0",
"version": "1.5.5",
"description": "Meeting room booking",
"main": "main.js",
"scripts": {
Expand All @@ -18,14 +19,8 @@
},
"homepage": "https://github.com/steedos/app-meeting#readme",
"dependencies": {
"@steedos/meteor-bundle-runner": "^1.1.6",
"@steedos/objectql": "^0.0.11",
"@steedos/meteor-bundle-runner": "^1.5.1",
"@steedos/objectql": "^1.5.5",
"steedos-server": "^1.2.5"
},
"resolutions": {
"graphql": "^14.1.1",
"@steedos/objectql": "^0.0.11",
"@steedos/core": "^1.1.15",
"@steedos/auth": "^1.0.4"
}
}
39 changes: 36 additions & 3 deletions docs/api_auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,24 @@ title: 身份验证
以下示例需确认 Steedos服务 运行于 http://localhost:5000

## 获取 Token

调用用户登录接口,获取用户登录Token

### URL

```js
POST 'http://localhost:5000/api/v4/users/login'
```

### 请求参数

以JSON格式传入请求参数。
|Param |Required |Type |Description |
|:-------- |:------- |:----- |----- |
|username |true |string |可传入用户名、邮箱或手机号。 |
|password |true |string |用户密码。 |
|spaceId |false |string |需要登录的工作区Id,如果不传入,自动选中第一个工作区。 |

```json
{
"username": "jack",
Expand All @@ -47,42 +51,71 @@ spaces: [space] # 数组,用户所属的所有工作区
company:
_id: i6thCRrKWYmdjxpzt # 用户所属主单位
name: Apple China # 用户所属主单位名称
organization: xxx # 用户所属主单位关联组织id
companies: [company] # 数组,用户所属的所有单位
organization:
_id: i6thCRrKWYmdjxpzt
name: Sales # 用户所属部门
fullname: Apple China/Sales # 用户所属部门的全称
company_id: xxx # 用户所属部门关联单位id
organizations: [organization] # 数组,用户所属的所有部门
```
### Header 返回结果
Header返回X-Space-Token。
```shell
X-Space-Token: i6thCRrKWYmdjxpzt,392mkylUmFyNTRLR3aSTbsyM287On8bTULh-GDO1sH_
```
### Cookie 返回结果
如果从浏览器登录,自动为浏览器设置以下Cookie。
```shell
X-User-Id: dL4KFkLSqqGAozZ6C
X-Auth-Token: 392mkylUmFyNTRLR3aSTbsyM287On8bTULh-GDO1sH_
X-Space-Id: i6thCRrKWYmdjxpzt
X-Space-Token: i6thCRrKWYmdjxpzt,392mkylUmFyNTRLR3aSTbsyM287On8bTULh-GDO1sH_
```
## 调用API
## 验证登录状态
这里测试调用validate接口,验证用户是否登录。
这里测试调用validate接口,验证用户是否登录,如果用户已登录,则返回用户基本信息
### URL
```js
POST 'http://localhost:5000/api/v4/users/validate'
```

### 请求参数

通过Header传入X-Space-Token。

```shell
Authorization: Bearer i6thCRrKWYmdjxpzt,392mkylUmFyNTRLR3aSTbsyM287On8bTULh-GDO1sH_
```

### 返回结果

如果当前用户已登录,则返回userContext。

## 注销

注销当前登录的用户。

### URL

```js
POST 'http://localhost:5000/accounts/logout'
```

### 请求参数


### 返回结果
如果当前用户已登录,则返回userContext。

Binary file added docs/assets/notification_list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/notification_unread.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,12 @@ name: 客户
description: 管理客户,以及相关的联系人、任务和日程。
icon_slds: folder
is_creator: true
objects:
objects:
- accounts
- contacts
- tasks
- events
- reports
```
## 调试与运行
Expand Down
39 changes: 39 additions & 0 deletions docs/notifications.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: 推送通知
---

有新消息到达时,Steedos 在页面右上角显示推送通知提醒。

![推送通知](assets/notification_unread.png)

点击推送通知图标,可以查看通知中心。通知中心只显示最新的20条通知。

![推送通知](assets/notification_list.png)

## 标准业务对象

标准业务对象内置以下通知功能。

### 审批通知

- 待审核
- 传阅
- 申请单已核准
- 申请单已驳回

### 任务通知

- 待办任务

## 自定义业务对象

自定义业务对象,如需发送推送通知,只需插入一条记录到 notifications 。例如

```yml
name: 庄建国给您安排了一个任务
related_to:
o: tasks
ids: ["task_id"]
related_name: 开发推送通知功能
url: http://link_url
```
Loading

0 comments on commit 2950847

Please sign in to comment.