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

11.1 通知 #25

Closed
7 of 11 tasks
trashmai opened this issue Nov 20, 2018 · 7 comments
Closed
7 of 11 tasks

11.1 通知 #25

trashmai opened this issue Nov 20, 2018 · 7 comments
Labels
previous 上一版的問題

Comments

@trashmai
Copy link

trashmai commented Nov 20, 2018

  • 依照通知類型設計 model ,或直接從既有 model 中調整、讀取通知相關資訊。
    通知類型包含:
    • (a) 申請欄位通知
    • (b) 問題回報 / 意見反饋通知
    • (c) 通過欄位申請
    • (d) 相機異常回報
    • (e) 上傳結果通知
    • (f) 系統管理員意見反饋回覆通知
    • (g) 系統通知
  • 依照計畫、角色、登入使用者等資訊篩選登入使用者應看到哪些通知。
  • API 設計
  • API 文件

Related to TaiBIF/camera-trap-webapp#57

@trashmai trashmai self-assigned this Nov 20, 2018
@trashmai trashmai mentioned this issue Nov 21, 2018
4 tasks
@oahehc
Copy link

oahehc commented Nov 21, 2018

GET /announcement/notifications
response 502

image

@ghost
Copy link

ghost commented Nov 22, 2018

目前 API 回傳格式與前端落差甚大
API response

   {
      "_id": "test_upload_session_02",
      "status": "ERROR",
      "modified": 1542706883.083,
      "created": 1541750624.016,
      "level": "WARNING",
      "message": "測試計畫1 臺東處-NULL<br/>TD03A 2018-01-01 00:00:00-2018-03-23 11:07:20",
      "collection": "UploadSession"
    },

而前端預設的格式是:

  {
    updateAt: '2018/07/23 17:25',
    project_id: '全島鼬獾',
    site: '屏東處',
    subSite: '潮州站',
    camera: 'PT09A',
    startAt: '2018/06/01',
    endAt: '2018/07/31',
    status: 1,
  },
  • API 端應取出對應的資料安排給前端,並提供必要資訊以組成 URL 形成連結

@ghost ghost added this to the 低優先項目 milestone Nov 22, 2018
@oahehc
Copy link

oahehc commented Nov 23, 2018

另外完成的部分, 希望各類型都能建一筆資料在測試帳號, 便於前端確認顯示格式, thanks

@trashmai
Copy link
Author

@oahehc 我補上欠缺的欄位了,欄位名稱稍微有點差異,startAt => earliestDataDate, endAt => latestDataDate。

@oahehc
Copy link

oahehc commented Nov 23, 2018

@trashmai
上傳成功失敗可否協助各塞一筆資料

@cjk-halodule
請協助定義各種類型的通知顯示方式

[
  {
    "_id": "fa7cc29e-a97f-464d-b020-ae702c98536f",
    "reportId": "fa7cc29e-a97f-464d-b020-ae702c98536f",
    "reportType": "問題回報",
    "reportContentType": "篩選及下載",
    "description": "下載CSV沒有回應",
    "email": "trashmail@gmail.com",
    "attachments": ["https://example.org/wait_forever.jpg"],
    "created": 1542793933.038,
    "modified": 1542793933.038,
    "message": "<trashmail@gmail.com><br/>[問題回報][篩選及下載]<br/>下載CSV沒有回應",
    "status": "WARNING",
    "collection": "UserReport"
  },
  {
    "_id": "d31ec2d4-0267-4423-a81b-dda177a95962",
    "reportId": "d31ec2d4-0267-4423-a81b-dda177a95962",
    "reportType": "意見反饋",
    "reportContentType": "資料編輯",
    "description": "太神奇啦~~",
    "email": "notTrashmai@gmail.com",
    "attachments": ["https://example.org/some_scratch.jpg"],
    "created": 1542785533.998,
    "modified": 1542785533.998,
    "message": "<notTrashmai@gmail.com><br/>[意見反饋][資料編輯]<br/>太神奇啦~~",
    "status": "INFO",
    "collection": "UserReport"
  },
  {
    "_id": "test_upload_session_02",
    "status": "ERROR",
    "modified": 1542791508.528,
    "created": 1541750624.016,
    "level": "WARNING",
    "message": "測試計畫1 臺東處-NULL<br/>TD03A 2018-01-01 00:00:00-2018-03-23 11:07:20",
    "collection": "UploadSession"
  },
  {
    "_id": "test_upload_session",
    "status": "SUCCESS",
    "created": 1540788756.494,
    "modified": 1542791474.562,
    "level": "INFO",
    "message": "測試計畫1 新竹-南庄30林班<br/>HC21A 2017-01-26 09:35:27-2017-03-01 10:25:04",
    "collection": "UploadSession"
  },
  {
    "_id": "69d10deccf4b8f449204731df940ca57",
    "message": "(使用者) 回報相機異常:相機電量耗損過快<br/>測試計畫1 新竹-南庄30林班<br/>HC21A 2018/10/01-2018/11/16",
    "level": "WARNING",
    "modified": 1542563213.889,
    "created": 1542563213.889,
    "collection": "AbnormalData"
  },
  {
    "_id": "06fc82ba-2ea6-433e-9980-c5b9c7e04d44",
    "message": "系統今夜緊急維修,請暫停使用",
    "level": "WARNING",
    "created": 1541508803.35,
    "modified": 1541508803.35,
    "collection": "Announcement"
  },
  {
    "_id": "072529b2-1a90-4852-91e4-bc314ef426ca",
    "message": "系統建置中",
    "level": "INFO",
    "created": 1541508776.771,
    "modified": 1541508776.771,
    "collection": "Announcement"
  }
]

@ghost
Copy link

ghost commented Nov 23, 2018

這部分後端還需要調整輸出格式,我會看看如何做。

@ghost ghost unassigned trashmai Apr 23, 2019
@ghost ghost removed this from the 收尾項目 milestone Apr 23, 2019
@kelp404 kelp404 added the previous 上一版的問題 label Apr 28, 2019
@ghost
Copy link

ghost commented May 1, 2019

Implemented in V1.

@ghost ghost closed this as completed May 1, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
previous 上一版的問題
Projects
None yet
Development

No branches or pull requests

3 participants