Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.1 計畫管理 (計畫基本資訊) #46

Closed
oahehc opened this issue Nov 25, 2018 · 5 comments
Closed

3.1 計畫管理 (計畫基本資訊) #46

oahehc opened this issue Nov 25, 2018 · 5 comments

Comments

@oahehc
Copy link

oahehc commented Nov 25, 2018

應該會有一支 API for 計畫基本資訊編輯?
image

畫面可編輯的欄位如下

    "projectTitle": "測試計畫1 // 計畫名稱",
    "shortTitle": "測1 // 計畫簡稱",
    "funder": "林務局 // 委辦單位",
    "projectId": "FB-test-cameratrap-01 // 計畫編號",
    "principalInvestigator": "測試principalInvestigator // 計畫主持人",
    "projectStartDate": "2018-10-15 // 計畫時間:起",
    "projectEndDate": "2018-12-10 // 計畫時間:迄",
    "adminArea": [ // 計畫地區, 見 WF 2.3.7
      "苗栗縣",
      "新竹縣"
    ],
    "abstract": "// 計畫摘要",
    "remarks": "// 備註",
@ghost ghost added this to the 計畫資料管理及更新 W1 WF2 WF3 milestone Nov 25, 2018
@ghost ghost added this to To do in API v0 development via automation Nov 25, 2018
@ghost ghost changed the title 3.1 計畫管理理 (計畫基本資訊) 3.1 計畫管理 (計畫基本資訊) Nov 25, 2018
@trashmai
Copy link

@oahehc
POST to /project/bulk-update

[{
    "_id": "測試計畫1", // filter condition
    "projectTitle": "測試計畫1", // for access control
    "$set": { // set values
      "projectTitle": 不允許更改
      "shortTitle": "測1 // 計畫簡稱",
      "funder": "林務局 // 委辦單位",
      "projectId": "FB-test-cameratrap-01 // 計畫編號",
      "principalInvestigator": "測試principalInvestigator // 計畫主持人",
      "projectStartDate": "2018-10-15 // 計畫時間:起",
      "projectEndDate": "2018-12-10 // 計畫時間:迄",
      "adminArea": [ // 計畫地區, 見 WF 2.3.7
        "苗栗縣",
        "新竹縣"
      ],
      "abstract": "// 計畫摘要",
      "remarks": "// 備註"
  }
}]

@trashmai trashmai moved this from To do to Done in API v0 development Nov 26, 2018
@oahehc
Copy link
Author

oahehc commented Nov 26, 2018

@cjk-halodule
"projectTitle": 不允許更改 => 這部分請協助確認一下前端是不show欄位還是disable input

@trashmai

  1. 若部分欄位未傳, 是會保留原資料還是被改成空白?
  2. 其他 project 編輯功能(3.2,3.4...)會開新 api 還是一併整合在這支?
  3. "_id": "測試計畫1", // filter condition
    => _id 會改為由系統生成 unique key?
  4. "projectTitle": "測試計畫1", // for access control
    => 所以 project title 不允許重複, 否則權限抓取會有錯誤?

@ghost
Copy link

ghost commented Nov 26, 2018

Thanks @oahehc please disable input.

@trashmai
Copy link

@oahehc

  1. 使用 /bulk-update 時, $set 只會改變有列出的部分,未傳的部分會保留db中的原有資料。
  2. 目前都合併在這支。(其他 model 的基本資料編輯方式也相同)
  3. 是 (暫時如此,如果3要改,4未來亦可統一改成使用 _id )

@ghost ghost assigned oahehc Nov 27, 2018
@ghost
Copy link

ghost commented Nov 28, 2018

@oahehc 目前 API 應已使用 _id, 請確認此票是否仍有需求?

@oahehc oahehc closed this as completed Dec 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

2 participants