Skip to content

Instantly share code, notes, and snippets.

@ZhenDeng
Last active September 10, 2020 03:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZhenDeng/00d7a1d407663828f6edf989dd798e82 to your computer and use it in GitHub Desktop.
Save ZhenDeng/00d7a1d407663828f6edf989dd798e82 to your computer and use it in GitHub Desktop.
export class ProcessTypeEnum
{
public static readonly Appeal = "Appeal";
public static readonly CourseProgress = "Course Progress";
public static readonly WelfareManagement = "Welfare Management";
public static readonly IecDurationChange = "Change IEC Duration";
public static readonly Attendance = "Attendance";
public static readonly CompletionStudyAbroad = "Completion-Study Abroad";
public static readonly Withdrawal = "Withdrawal";
public static readonly Suspension = "Suspension";
public static readonly SchoolYearChange = "School Year Change";
public static readonly TerminateCourse = "Terminate Course";
public static readonly LeaveManagement = "Leave Management";
public static readonly CompletionISP = "Completion-ISP";
public static readonly ATEManagement = "ATE Management";
public static readonly SchoolInterview = "School Interview";
public static readonly IECorSchoolPlacement = "IEC or School Placement";
public static readonly IECtoSchoolTransition = "IEC to School Transition";
public static readonly IECorSchoolTransfer = "IEC or School Transfer";
public static readonly COEManagement = "COE Management";
public static readonly PlacementSuitability = "Placement Suitability";
public static readonly PNH = "PNH";
}
export const PROCESS_NAMES = {
ATE_MANAGEMENT: 'ATE Management',
PLACEMENT: 'IEC or School Placement',
APPEAL: 'Appeal',
COURSE_PROGRESS: 'Course Progress',
WELFARE_MANAGEMENT: 'Welfare Management',
IEC_DURATION_CHANGE: 'Change IEC Duration',
ATTENDANCE: 'Attendance',
COMPLETION_STUDY_ABROAD: 'Completion-Study Abroad',
WITHDRAWAL: 'Withdrawal',
SUSPENSION: 'Suspension',
SCHOOL_YEAR_CHANGE: 'School Year Change',
TERMINATE_COURSE: 'Terminate Course',
LEAVE_MANAGEMENT: 'Leave Management',
COMPLETION_ISP: 'Completion-ISP',
SCHOOL_INTERVIEW: 'School Interview',
IEC_SCHOOL_TRANSITION: 'IEC to School Transition',
IEC_SCHOOL_TRANSFER: 'IEC or School Transfer',
COE_MANAGEMENT: 'COE Management',
PLACEMENT_SUITABILITY: 'Placement Suitability',
IEC_ASSESSMENT: 'IEC Assessment',
COMPLETION_BOTH: 'Completion'
}
import { NoteDTO } from '../notes/create-notes';
export class WorktrayItem {
WorkTrayId: string;
ProcessRequestId: string;
ProcessTypeId: string;
ProcessName: string;
StudentNumber: string;
StudentId: string;
FamilyName: string;
GivenName: string;
Nationality: string;
NationalityCountryId: string;
DateOfBirth: Date | null;
Gender: string;
Program: string;
SchoolYear: number;
RelatedSchoolId: string;
Agent: string;
HomeStayProvider: string;
Status: string;
ProcessStatus: string;
Description: string;
ModifiedDate: Date;
WarningDate: Date | null;
ExtensionData: { [key: string]: string };
WorkTrayItemType: string;
IsAnyNotes: boolean;
IsUnReadNotesAvailable: boolean;
Notes: NoteDTO[];
EnrolmentDate: Date | string | null;
CountryOfBirthId: string;
CountryOfBirth: string;
DisplayOrder: number;
DeCaseOfficer: string;
NeedReAcknowledgement: boolean;
ProcessAllWorkTrayItemIdList: string[];
AssignedStaffId: string;
constructor(worktrayItem: WorktrayItem | any) {
this.WorkTrayId = worktrayItem.WorkTrayId;
this.ProcessRequestId = worktrayItem.ProcessRequestId;
this.ProcessTypeId = worktrayItem.ProcessTypeId;
this.ProcessName = worktrayItem.ProcessName;
this.StudentNumber = worktrayItem.StudentNumber;
this.StudentId = worktrayItem.StudentId;
this.FamilyName = worktrayItem.FamilyName;
this.Nationality = worktrayItem.Nationality;
this.NationalityCountryId = worktrayItem.NationalityCountryId;
this.GivenName = worktrayItem.GivenName;
this.DateOfBirth = worktrayItem.DateOfBirth;
this.Gender = worktrayItem.Gender;
this.Program = worktrayItem.Program;
if (worktrayItem.SchoolYear !== null) {
if (worktrayItem.SchoolYear.toString().toLowerCase() === 'kindergarten') {
this.SchoolYear = 0;
} else {
this.SchoolYear = isNaN(worktrayItem.SchoolYear) ? Number(worktrayItem.SchoolYear.slice(4)) : Number(worktrayItem.SchoolYear);
}
} else {
this.SchoolYear = 0;
}
this.RelatedSchoolId = worktrayItem.RelatedSchoolId;
this.Agent = worktrayItem.Agent;
this.HomeStayProvider = worktrayItem.HomeStayProvider;
this.Status = worktrayItem.Status;
this.ProcessStatus = worktrayItem.ProcessStatus;
this.Description = worktrayItem.Description;
this.ModifiedDate = worktrayItem.ModifiedDate;
this.WarningDate = worktrayItem.WarningDate;
this.ExtensionData = worktrayItem.ExtensionData;
this.WorkTrayItemType = worktrayItem.WorkTrayItemType;
this.IsAnyNotes = worktrayItem.IsAnyNotes;
this.IsUnReadNotesAvailable = worktrayItem.IsUnReadNotesAvailable;
this.Notes = worktrayItem.Notes;
this.CountryOfBirthId = worktrayItem.CountryOfBirthId;
this.CountryOfBirth = worktrayItem.CountryOfBirth;
this.DisplayOrder = Number(worktrayItem.DisplayOrder);
this.DeCaseOfficer = worktrayItem.DeCaseOfficer;
this.AssignedStaffId = worktrayItem.AssignedStaffId;
this.NeedReAcknowledgement = worktrayItem.NeedReAcknowledgement;
this.ProcessAllWorkTrayItemIdList = worktrayItem.ProcessAllWorkTrayItemIdList;
}
}
C#: public Dictionary<string, string> ExtensionData { get; set; }
Angular Model: ExtensionData: { [key: string]: string };
Implementation: this.worktrayItem.ExtensionData.SchoolTerm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment