0.1.1 • Published 6 months ago

timetablev2 v0.1.1

Weekly downloads
-
License
-
Repository
-
Last release
6 months ago

TimetableV2

student

usage

  <Timetable
    target="student"
    timeblockList={timeBlockList}
    schedule={{
      week: 3,
      time: 90
    }}
    subject={{ code: "", name: "사탐" }}
    onChange={(e) => console.log(e)}
  />

teacher

usage

가능시간 설정

  <Timetable
    target="teacher"
    timeblockList={timeBlockList}
    // changedId={4}
    onChange={(e) => console.log(e)}
  />

정규일정 변경

  <Timetable
    target="teacher"
    timeblockList={timeBlockList}
    schedule={{
      week: 2,
      time: 60
    }}
    subject={{ code: "", name: "" }}
    changedId={4}
    onChange={(e) => console.log(e)}
  />

props 데이터 설명

props필수여부설명type
targettrue사용자의 구분값(학생, 선생님, 어드민)"student", "teacher", "admin"
timeblockListtrue사용자의 시간표정보 데이터Array<{ lecture:Number, status: string, subjectCode: string, subjectName: string, timeBlockId: Number }>
schedulefalse학생의 경우는 결제한 주, 시간, 선생님의 경우는 정규일정 변경에서의 주, 시간{ week: number, time: number }
subjectfalse학생의 경우는 결제한 과목코드, 과목이름 선생님의 경우는 정규일정 변경에서의 과목코드, 과목이름{ name: string, code: string }
readOnlyfalse시간표조회만 하는경우boolean
onChangetrue유저가 시간표의 정보를 수정할 경우 함수가 동작(Array) => void

timeBlockList props 설명

Array의 형태를 가지고 있음 TimeBlock의 구성요소 | key | valueType | 설명 | 필수여부 | | --- | --- | --- | --- | | lectureId | number | 수업Id | false | | status | string | EDIT, ENABLED, TEMP_MATCHED, MATCHED 값을 사용 | true | | subjectName | string | 과목이름 | false | | timeBlockId | number | 타임블럭Id | true | | name | string | 학생의 이름, 선생님 이름 | false

zIndex 관련 사항

statusBlock(타임블럭)에서 zIndex를 1로하여 작업하여 주의하여 작업하시면 됩니다. 추후 zIndex를 제거하는 방향으로 업데이트 예정