diff --git a/README.md b/README.md index b3a4ce8..f6c6628 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,6 @@ - Angular 17+ - Node.js 18+ -- angular-calendar -- date-fns ## 安裝說明 @@ -42,6 +40,147 @@ git clone http://www.origtek.com:2999/juro.hsu/CalendarManager.git - `PUT /api/calendar/closeMeeting` - 關閉單一會議 - `PUT /api/calendar/closeAllRepeatMeeting` - 關閉所有重複會議 +### API 詳細說明 + +#### 1. 驗證使用者權限 +- **方法**:GET +- **路徑**:`/api/calendar/getAuth` +- **查詢參數**: + - `id`:使用者ID(string) +- **回傳格式**: +```json +{ "success": true } // 有權限 +{ "success": false } // 無權限 +``` +- **用途**:判斷指定使用者是否為櫃檯人員。 + +#### 2. 取得所有會議室 +- **方法**:GET +- **路徑**:`/api/calendar/getMeetingRoom` +- **查詢參數**:無 +- **回傳格式**: +```json +[ + { "id": 1, "name": "會議室A" }, + { "id": 2, "name": "會議室B" } +] +``` +- **用途**:取得所有會議室清單。 + +#### 3. 取得會議申請列表(依月份) +- **方法**:GET +- **路徑**:`/api/calendar/getMeetingApply` +- **查詢參數**: + - `Date`:查詢月份(格式:YYYYMM,必填) + - `roomId`:會議室ID(可選,預設查全部) + - `old`:是否查詢已結束/刪除(可選,'true'查全部,預設僅查未結束且未刪除) +- **回傳格式**: +```json +[ + { + "id": 1, + "roomId": 2, + "subject": "會議主題", + "remark": "備註", + "beginTime": "2024-06-01 09:00:00", + "endTime": "2024-06-01 10:00:00", + "status": "已批准", + "parentId": null, + "falseDelete": 0, + "isRepeat": false, + "createdBy": "王小明", + "createdAt": "2024-05-20 08:00:00", + "updatedAt": "2024-05-20 08:00:00" + } +] +``` +- **用途**:依月份查詢所有(或指定會議室)會議申請。 + +#### 4. 取得特定會議詳情 +- **方法**:GET +- **路徑**:`/api/calendar/getMeetingApplyById` +- **查詢參數**: + - `meetingId`:會議申請ID(必填) +- **回傳格式**: +```json +{ + "id": 1, + "roomId": 2, + "subject": "會議主題", + "applyUser": "user01", + "applyUserName": "王小明", + "otherJoinMember": "user02,user03", + "type": "一般會議", + "beginTime": "2024-06-01 09:00:00", + "endTime": "2024-06-01 10:00:00", + "remark": "備註", + "status": "已批准", + "approvalOpinion": "同意", + "beginRemark": "準時開始", + "endRemark": "準時結束", + "conflict": 0, + "falseDelete": 0, + "applyTime": "2024-05-20 08:00:00", + "deletedAt": null, + "createdAt": "2024-05-20 08:00:00", + "updatedAt": "2024-05-20 08:00:00", + "reminderTiming": null, + "signType": null, + "signWifi": null, + "externalUser": null, + "reminderTime": null, + "signUser": null, + "externalReminderType": null, + "sign": null, + "response": null, + "approvalUser": null, + "createTime": null, + "attenceType": null, + "interfaceId": null, + "videoInfo": null, + "isRepeat": false, + "repeatInterval": null, + "repeatType": null, + "repeatEndType": null, + "repeatEndNumber": null, + "repeatRemove": null, + "parentId": null, + "repeatEndDate": null, + "cycleBeginTime": null, + "cycleEndTime": null, + "createFrom": null +} +``` +- **用途**:查詢單一會議申請的完整詳細資訊。 + +#### 5. 關閉單一會議 +- **方法**:PUT +- **路徑**:`/api/calendar/closeMeeting` +- **Body**: +```json +{ "meetingId": 1 } +``` +- **回傳格式**: +```json +{ "affectedRows": 1, ... } +``` +- **用途**:將指定會議申請狀態設為結束並標記為刪除。 + +#### 6. 關閉所有重複會議 +- **方法**:PUT +- **路徑**:`/api/calendar/closeAllRepeatMeeting` +- **Body**: +```json +{ "parentId": 1 } +``` +- **回傳格式**: +```json +{ "affectedRows": 3, ... } +``` +- **用途**:將同一重複會議(parentId相同)全部設為結束並標記為刪除。 + +--- + ## 主要元件 ### CalendarComponent