latest
This commit is contained in:
parent
47d47d44c7
commit
5804f644ea
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1,3 @@
|
|||||||
node_modules
|
node_modules
|
||||||
|
|
||||||
|
.env
|
||||||
@ -3,7 +3,7 @@ export interface BaseNodeInterface {
|
|||||||
h: number;
|
h: number;
|
||||||
color: string;
|
color: string;
|
||||||
__primarylabel__: string;
|
__primarylabel__: string;
|
||||||
unique_id: string;
|
uuid_string: string;
|
||||||
path: string;
|
path: string;
|
||||||
created: string;
|
created: string;
|
||||||
merged: string;
|
merged: string;
|
||||||
@ -91,9 +91,8 @@ export interface CalendarTimeChunkNodeInterface extends BaseNodeInterface {
|
|||||||
// School
|
// School
|
||||||
export interface SchoolNodeInterface extends BaseNodeInterface
|
export interface SchoolNodeInterface extends BaseNodeInterface
|
||||||
{
|
{
|
||||||
school_name: string;
|
name: string;
|
||||||
school_website: string;
|
website: string;
|
||||||
school_uuid: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DepartmentNodeInterface extends BaseNodeInterface
|
export interface DepartmentNodeInterface extends BaseNodeInterface
|
||||||
|
|||||||
@ -14,7 +14,7 @@ const stateProps = T.object({
|
|||||||
const graphBaseProps = {
|
const graphBaseProps = {
|
||||||
...baseShapeProps,
|
...baseShapeProps,
|
||||||
__primarylabel__: T.string,
|
__primarylabel__: T.string,
|
||||||
unique_id: T.string,
|
uuid_string: T.string,
|
||||||
path: T.string,
|
path: T.string,
|
||||||
created: T.string,
|
created: T.string,
|
||||||
merged: T.string,
|
merged: T.string,
|
||||||
@ -84,9 +84,8 @@ export const ccGraphShapeProps = {
|
|||||||
},
|
},
|
||||||
'cc-school-node': {
|
'cc-school-node': {
|
||||||
...graphBaseProps,
|
...graphBaseProps,
|
||||||
school_uuid: T.string,
|
name: T.string,
|
||||||
school_name: T.string,
|
website: T.string,
|
||||||
school_website: T.string,
|
|
||||||
},
|
},
|
||||||
'cc-department-node': {
|
'cc-department-node': {
|
||||||
...graphBaseProps,
|
...graphBaseProps,
|
||||||
@ -283,7 +282,7 @@ export const getDefaultBaseProps = () => ({
|
|||||||
backgroundColor: '#f0f0f0' as string,
|
backgroundColor: '#f0f0f0' as string,
|
||||||
title: 'Untitled' as string,
|
title: 'Untitled' as string,
|
||||||
isLocked: false as boolean,
|
isLocked: false as boolean,
|
||||||
unique_id: '' as string,
|
uuid_string: '' as string,
|
||||||
path: '' as string,
|
path: '' as string,
|
||||||
created: '' as string,
|
created: '' as string,
|
||||||
merged: '' as string,
|
merged: '' as string,
|
||||||
@ -382,9 +381,8 @@ export const getDefaultCCSchoolNodeProps = () => ({
|
|||||||
...getDefaultBaseProps(),
|
...getDefaultBaseProps(),
|
||||||
title: 'School',
|
title: 'School',
|
||||||
__primarylabel__: 'School',
|
__primarylabel__: 'School',
|
||||||
school_uuid: '',
|
name: '',
|
||||||
school_name: '',
|
website: '',
|
||||||
school_website: '',
|
|
||||||
})
|
})
|
||||||
|
|
||||||
export const getDefaultCCDepartmentNodeProps = () => ({
|
export const getDefaultCCDepartmentNodeProps = () => ({
|
||||||
|
|||||||
@ -15,7 +15,7 @@ export interface ShapeState {
|
|||||||
|
|
||||||
export type CCGraphShapeProps = CCBaseProps & {
|
export type CCGraphShapeProps = CCBaseProps & {
|
||||||
__primarylabel__: string
|
__primarylabel__: string
|
||||||
unique_id: string
|
uuid_string: string
|
||||||
path: string
|
path: string
|
||||||
created: string
|
created: string
|
||||||
merged: string
|
merged: string
|
||||||
@ -26,7 +26,7 @@ export type CCGraphShapeProps = CCBaseProps & {
|
|||||||
// Define the base shape type for graph shapes
|
// Define the base shape type for graph shapes
|
||||||
export type CCGraphShape = CCBaseShape & TLBaseShape<GraphShapeType, {
|
export type CCGraphShape = CCBaseShape & TLBaseShape<GraphShapeType, {
|
||||||
__primarylabel__: CCGraphShapeProps['__primarylabel__']
|
__primarylabel__: CCGraphShapeProps['__primarylabel__']
|
||||||
unique_id: CCGraphShapeProps['unique_id']
|
uuid_string: CCGraphShapeProps['uuid_string']
|
||||||
path: CCGraphShapeProps['path']
|
path: CCGraphShapeProps['path']
|
||||||
created: CCGraphShapeProps['created']
|
created: CCGraphShapeProps['created']
|
||||||
merged: CCGraphShapeProps['merged']
|
merged: CCGraphShapeProps['merged']
|
||||||
@ -93,9 +93,8 @@ export type CCCalendarTimeChunkNodeProps = CCGraphShapeProps & {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export type CCSchoolNodeProps = CCGraphShapeProps & {
|
export type CCSchoolNodeProps = CCGraphShapeProps & {
|
||||||
school_uuid: string
|
name: string
|
||||||
school_name: string
|
website: string
|
||||||
school_website: string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type CCDepartmentNodeProps = CCGraphShapeProps & {
|
export type CCDepartmentNodeProps = CCGraphShapeProps & {
|
||||||
@ -332,7 +331,7 @@ export const getShapeType = (nodeType: keyof CCNodeTypes): string => {
|
|||||||
|
|
||||||
// Helper function to get allowed props from node type
|
// Helper function to get allowed props from node type
|
||||||
export const getAllowedProps = (): string[] => {
|
export const getAllowedProps = (): string[] => {
|
||||||
return ['__primarylabel__', 'unique_id'];
|
return ['__primarylabel__', 'uuid_string'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper function to get node configuration
|
// Helper function to get node configuration
|
||||||
|
|||||||
@ -121,9 +121,9 @@ const createNodeComponent = (shape: AllNodeShapes, theme: TLDefaultColorTheme, e
|
|||||||
}
|
}
|
||||||
isFetchingConnectedNodes = true;
|
isFetchingConnectedNodes = true;
|
||||||
|
|
||||||
console.log("Getting connected nodes for:", shape.props.unique_id);
|
console.log("Getting connected nodes for:", shape.props.uuid_string);
|
||||||
try {
|
try {
|
||||||
const response = await axios.get(`/api/database/tools/get-connected-nodes-and-edges?unique_id=${shape.props.unique_id}`);
|
const response = await axios.get(`/api/database/tools/get-connected-nodes-and-edges?uuid_string=${shape.props.uuid_string}`);
|
||||||
console.log("Connected nodes response:", response.data);
|
console.log("Connected nodes response:", response.data);
|
||||||
if (response.data.status === "success") {
|
if (response.data.status === "success") {
|
||||||
const mainNode = response.data.main_node;
|
const mainNode = response.data.main_node;
|
||||||
@ -133,7 +133,7 @@ const createNodeComponent = (shape: AllNodeShapes, theme: TLDefaultColorTheme, e
|
|||||||
// Add nodes to the graph
|
// Add nodes to the graph
|
||||||
[mainNode, ...connectedNodes].forEach((node: any) => {
|
[mainNode, ...connectedNodes].forEach((node: any) => {
|
||||||
console.log("Node:", node);
|
console.log("Node:", node);
|
||||||
const newShapeId = createShapeId(node.node_data.unique_id);
|
const newShapeId = createShapeId(node.node_data.uuid_string);
|
||||||
const doesShapeExist = editor.getShape(newShapeId);
|
const doesShapeExist = editor.getShape(newShapeId);
|
||||||
if (!doesShapeExist) {
|
if (!doesShapeExist) {
|
||||||
console.log("Creating new shape with ID:", newShapeId);
|
console.log("Creating new shape with ID:", newShapeId);
|
||||||
@ -177,7 +177,7 @@ const createNodeComponent = (shape: AllNodeShapes, theme: TLDefaultColorTheme, e
|
|||||||
|
|
||||||
// Add edges to the graph
|
// Add edges to the graph
|
||||||
relationships.forEach((relationship: any) => {
|
relationships.forEach((relationship: any) => {
|
||||||
graphState.addEdge(relationship.start_node.unique_id, relationship.end_node.unique_id);
|
graphState.addEdge(relationship.start_node.uuid_string, relationship.end_node.uuid_string);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Create edge shapes
|
// Create edge shapes
|
||||||
|
|||||||
@ -43,7 +43,7 @@ const baseNodeShapeProps = {
|
|||||||
h: T.number,
|
h: T.number,
|
||||||
color: DefaultColorStyle,
|
color: DefaultColorStyle,
|
||||||
__primarylabel__: T.string,
|
__primarylabel__: T.string,
|
||||||
unique_id: T.string,
|
uuid_string: T.string,
|
||||||
path: T.string,
|
path: T.string,
|
||||||
created: T.string,
|
created: T.string,
|
||||||
merged: T.string,
|
merged: T.string,
|
||||||
@ -126,9 +126,8 @@ export const calendarTimeChunkNodeShapeProps: RecordProps<CalendarTimeChunkNodeS
|
|||||||
// School
|
// School
|
||||||
export const schoolNodeShapeProps: RecordProps<SchoolNodeShape> = {
|
export const schoolNodeShapeProps: RecordProps<SchoolNodeShape> = {
|
||||||
...baseNodeShapeProps,
|
...baseNodeShapeProps,
|
||||||
school_name: T.string,
|
name: T.string,
|
||||||
school_website: T.string,
|
website: T.string,
|
||||||
school_uuid: T.string,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const departmentNodeShapeProps: RecordProps<DepartmentNodeShape> = {
|
export const departmentNodeShapeProps: RecordProps<DepartmentNodeShape> = {
|
||||||
|
|||||||
@ -126,13 +126,13 @@ export class UserNodeShapeUtil extends BaseNodeShapeUtil<UserNodeShape> {
|
|||||||
h: 200,
|
h: 200,
|
||||||
color: 'blue',
|
color: 'blue',
|
||||||
__primarylabel__: 'User',
|
__primarylabel__: 'User',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
user_name: '',
|
user_name: '',
|
||||||
user_email: '',
|
user_email: '',
|
||||||
user_type: '',
|
user_type: '',
|
||||||
user_id: '',
|
user_id: '',
|
||||||
worker_node_data: '',
|
worker_node_data: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -150,12 +150,12 @@ export class DeveloperNodeShapeUtil extends BaseNodeShapeUtil<DeveloperNodeShape
|
|||||||
h: 200,
|
h: 200,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Developer',
|
__primarylabel__: 'Developer',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
user_name: '',
|
user_name: '',
|
||||||
user_email: '',
|
user_email: '',
|
||||||
user_type: '',
|
user_type: '',
|
||||||
user_id: '',
|
user_id: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -173,12 +173,12 @@ export class TeacherNodeShapeUtil extends BaseNodeShapeUtil<TeacherNodeShape> {
|
|||||||
h: 200,
|
h: 200,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Teacher',
|
__primarylabel__: 'Teacher',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
teacher_code: '',
|
teacher_code: '',
|
||||||
teacher_name_formal: '',
|
teacher_name_formal: '',
|
||||||
teacher_email: '',
|
teacher_email: '',
|
||||||
worker_db_name: '',
|
worker_db_name: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -196,12 +196,12 @@ export class StudentNodeShapeUtil extends BaseNodeShapeUtil<StudentNodeShape> {
|
|||||||
h: 200,
|
h: 200,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Student',
|
__primarylabel__: 'Student',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
student_code: '',
|
student_code: '',
|
||||||
student_name_formal: '',
|
student_name_formal: '',
|
||||||
student_email: '',
|
student_email: '',
|
||||||
worker_db_name: '',
|
worker_db_name: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -220,11 +220,11 @@ export class CalendarNodeShapeUtil extends BaseNodeShapeUtil<CalendarNodeShape>
|
|||||||
h: 200,
|
h: 200,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Calendar',
|
__primarylabel__: 'Calendar',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
name: '',
|
name: '',
|
||||||
start_date: '',
|
start_date: '',
|
||||||
end_date: '',
|
end_date: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -242,9 +242,9 @@ export class CalendarYearNodeShapeUtil extends BaseNodeShapeUtil<CalendarYearNod
|
|||||||
h: 200,
|
h: 200,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Calendar Year',
|
__primarylabel__: 'Calendar Year',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
year: '',
|
year: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: ''
|
merged: ''
|
||||||
}
|
}
|
||||||
@ -262,11 +262,11 @@ export class CalendarMonthNodeShapeUtil extends BaseNodeShapeUtil<CalendarMonthN
|
|||||||
h: 200,
|
h: 200,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Calendar Month',
|
__primarylabel__: 'Calendar Month',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
year: '',
|
year: '',
|
||||||
month: '',
|
month: '',
|
||||||
month_name: '',
|
month_name: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -284,11 +284,11 @@ export class CalendarWeekNodeShapeUtil extends BaseNodeShapeUtil<CalendarWeekNod
|
|||||||
h: 200,
|
h: 200,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Calendar Week',
|
__primarylabel__: 'Calendar Week',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
start_date: '',
|
start_date: '',
|
||||||
week_number: '',
|
week_number: '',
|
||||||
iso_week: '',
|
iso_week: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -306,11 +306,11 @@ export class CalendarDayNodeShapeUtil extends BaseNodeShapeUtil<CalendarDayNodeS
|
|||||||
h: 200,
|
h: 200,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Calendar Day',
|
__primarylabel__: 'Calendar Day',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
date: '',
|
date: '',
|
||||||
day_of_week: '',
|
day_of_week: '',
|
||||||
iso_day: '',
|
iso_day: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -328,10 +328,10 @@ export class CalendarTimeChunkNodeShapeUtil extends BaseNodeShapeUtil<CalendarTi
|
|||||||
h: 200,
|
h: 200,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Calendar Time Chunk',
|
__primarylabel__: 'Calendar Time Chunk',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
start_time: '',
|
start_time: '',
|
||||||
end_time: '',
|
end_time: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -350,12 +350,12 @@ export class SubjectClassNodeShapeUtil extends BaseNodeShapeUtil<SubjectClassNod
|
|||||||
h: 200,
|
h: 200,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Subject Class',
|
__primarylabel__: 'Subject Class',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
subject_class_code: '',
|
subject_class_code: '',
|
||||||
year_group: '',
|
year_group: '',
|
||||||
subject: '',
|
subject: '',
|
||||||
subject_code: '',
|
subject_code: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -373,11 +373,10 @@ export class SchoolNodeShapeUtil extends BaseNodeShapeUtil<SchoolNodeShape> {
|
|||||||
h: 200,
|
h: 200,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'School',
|
__primarylabel__: 'School',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
school_uuid: '',
|
name: '',
|
||||||
school_name: '',
|
website: '',
|
||||||
school_website: '',
|
node_storage_path: '',
|
||||||
path: '',
|
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -395,9 +394,9 @@ export class DepartmentNodeShapeUtil extends BaseNodeShapeUtil<DepartmentNodeSha
|
|||||||
h: 200,
|
h: 200,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Department',
|
__primarylabel__: 'Department',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
department_name: '',
|
department_name: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -415,10 +414,10 @@ export class RoomNodeShapeUtil extends BaseNodeShapeUtil<RoomNodeShape> {
|
|||||||
h: 200,
|
h: 200,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Room',
|
__primarylabel__: 'Room',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
room_name: '',
|
room_name: '',
|
||||||
room_code: '',
|
room_code: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -438,8 +437,8 @@ export class PastoralStructureNodeShapeUtil extends BaseNodeShapeUtil<PastoralSt
|
|||||||
h: 130,
|
h: 130,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Pastoral Structure',
|
__primarylabel__: 'Pastoral Structure',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -457,10 +456,10 @@ export class YearGroupNodeShapeUtil extends BaseNodeShapeUtil<YearGroupNodeShape
|
|||||||
h: 150,
|
h: 150,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Year Group',
|
__primarylabel__: 'Year Group',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
year_group: '',
|
year_group: '',
|
||||||
year_group_name: '',
|
year_group_name: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -478,8 +477,8 @@ export class CurriculumStructureNodeShapeUtil extends BaseNodeShapeUtil<Curricul
|
|||||||
h: 130,
|
h: 130,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Curriculum Structure',
|
__primarylabel__: 'Curriculum Structure',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -497,10 +496,10 @@ export class KeyStageNodeShapeUtil extends BaseNodeShapeUtil<KeyStageNodeShape>
|
|||||||
h: 150,
|
h: 150,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Key Stage',
|
__primarylabel__: 'Key Stage',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
key_stage_name: '',
|
key_stage_name: '',
|
||||||
key_stage: '',
|
key_stage: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -518,13 +517,13 @@ export class KeyStageSyllabusNodeShapeUtil extends BaseNodeShapeUtil<KeyStageSyl
|
|||||||
h: 200,
|
h: 200,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Key Stage Syllabus',
|
__primarylabel__: 'Key Stage Syllabus',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
ks_syllabus_id: '',
|
ks_syllabus_id: '',
|
||||||
ks_syllabus_name: '',
|
ks_syllabus_name: '',
|
||||||
ks_syllabus_key_stage: '',
|
ks_syllabus_key_stage: '',
|
||||||
ks_syllabus_subject: '',
|
ks_syllabus_subject: '',
|
||||||
ks_syllabus_subject_code: '',
|
ks_syllabus_subject_code: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -542,13 +541,13 @@ export class YearGroupSyllabusNodeShapeUtil extends BaseNodeShapeUtil<YearGroupS
|
|||||||
h: 200,
|
h: 200,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Year Group Syllabus',
|
__primarylabel__: 'Year Group Syllabus',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
yr_syllabus_id: '',
|
yr_syllabus_id: '',
|
||||||
yr_syllabus_name: '',
|
yr_syllabus_name: '',
|
||||||
yr_syllabus_year_group: '',
|
yr_syllabus_year_group: '',
|
||||||
yr_syllabus_subject: '',
|
yr_syllabus_subject: '',
|
||||||
yr_syllabus_subject_code: '',
|
yr_syllabus_subject_code: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -566,10 +565,10 @@ export class SubjectNodeShapeUtil extends BaseNodeShapeUtil<SubjectNodeShape> {
|
|||||||
h: 200,
|
h: 200,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Subject',
|
__primarylabel__: 'Subject',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
subject_code: '',
|
subject_code: '',
|
||||||
subject_name: '',
|
subject_name: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -587,13 +586,13 @@ export class TopicNodeShapeUtil extends BaseNodeShapeUtil<TopicNodeShape> {
|
|||||||
h: 400,
|
h: 400,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Topic',
|
__primarylabel__: 'Topic',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
topic_id: '',
|
topic_id: '',
|
||||||
topic_title: '',
|
topic_title: '',
|
||||||
total_number_of_lessons_for_topic: '',
|
total_number_of_lessons_for_topic: '',
|
||||||
topic_type: '',
|
topic_type: '',
|
||||||
topic_assessment_type: '',
|
topic_assessment_type: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -611,7 +610,7 @@ export class TopicLessonNodeShapeUtil extends BaseNodeShapeUtil<TopicLessonNodeS
|
|||||||
h: 500,
|
h: 500,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Topic Lesson',
|
__primarylabel__: 'Topic Lesson',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
topic_lesson_id: '',
|
topic_lesson_id: '',
|
||||||
topic_lesson_title: '',
|
topic_lesson_title: '',
|
||||||
topic_lesson_type: '',
|
topic_lesson_type: '',
|
||||||
@ -619,7 +618,7 @@ export class TopicLessonNodeShapeUtil extends BaseNodeShapeUtil<TopicLessonNodeS
|
|||||||
topic_lesson_skills_learned: '',
|
topic_lesson_skills_learned: '',
|
||||||
topic_lesson_suggested_activities: '',
|
topic_lesson_suggested_activities: '',
|
||||||
topic_lesson_weblinks: '',
|
topic_lesson_weblinks: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -637,11 +636,11 @@ export class LearningStatementNodeShapeUtil extends BaseNodeShapeUtil<LearningSt
|
|||||||
h: 300,
|
h: 300,
|
||||||
color: 'light-blue',
|
color: 'light-blue',
|
||||||
__primarylabel__: 'Learning Statement',
|
__primarylabel__: 'Learning Statement',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
lesson_learning_statement_id: '',
|
lesson_learning_statement_id: '',
|
||||||
lesson_learning_statement: '',
|
lesson_learning_statement: '',
|
||||||
lesson_learning_statement_type: '',
|
lesson_learning_statement_type: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -659,7 +658,7 @@ export class ScienceLabNodeShapeUtil extends BaseNodeShapeUtil<ScienceLabNodeSha
|
|||||||
h: 400,
|
h: 400,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Science Lab',
|
__primarylabel__: 'Science Lab',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
science_lab_id: '',
|
science_lab_id: '',
|
||||||
science_lab_title: '',
|
science_lab_title: '',
|
||||||
science_lab_summary: '',
|
science_lab_summary: '',
|
||||||
@ -667,7 +666,7 @@ export class ScienceLabNodeShapeUtil extends BaseNodeShapeUtil<ScienceLabNodeSha
|
|||||||
science_lab_procedure: '',
|
science_lab_procedure: '',
|
||||||
science_lab_safety: '',
|
science_lab_safety: '',
|
||||||
science_lab_weblinks: '',
|
science_lab_weblinks: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -687,10 +686,10 @@ export class SchoolTimetableNodeShapeUtil extends BaseNodeShapeUtil<SchoolTimeta
|
|||||||
h: 200,
|
h: 200,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'School Timetable',
|
__primarylabel__: 'School Timetable',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
start_date: '',
|
start_date: '',
|
||||||
end_date: '',
|
end_date: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -708,9 +707,9 @@ export class AcademicYearNodeShapeUtil extends BaseNodeShapeUtil<AcademicYearNod
|
|||||||
h: 200,
|
h: 200,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Academic Year',
|
__primarylabel__: 'Academic Year',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
year: '',
|
year: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -728,12 +727,12 @@ export class AcademicTermNodeShapeUtil extends BaseNodeShapeUtil<AcademicTermNod
|
|||||||
h: 200,
|
h: 200,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Academic Term',
|
__primarylabel__: 'Academic Term',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
term_name: '',
|
term_name: '',
|
||||||
term_number: '',
|
term_number: '',
|
||||||
start_date: '',
|
start_date: '',
|
||||||
end_date: '',
|
end_date: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -751,11 +750,11 @@ export class AcademicWeekNodeShapeUtil extends BaseNodeShapeUtil<AcademicWeekNod
|
|||||||
h: 200,
|
h: 200,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Academic Week',
|
__primarylabel__: 'Academic Week',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
start_date: '',
|
start_date: '',
|
||||||
week_type: '',
|
week_type: '',
|
||||||
academic_week_number: '',
|
academic_week_number: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -773,12 +772,12 @@ export class AcademicDayNodeShapeUtil extends BaseNodeShapeUtil<AcademicDayNodeS
|
|||||||
h: 200,
|
h: 200,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Academic Day',
|
__primarylabel__: 'Academic Day',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
academic_day: '',
|
academic_day: '',
|
||||||
date: '',
|
date: '',
|
||||||
day_of_week: '',
|
day_of_week: '',
|
||||||
day_type: '',
|
day_type: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -796,13 +795,13 @@ export class AcademicPeriodNodeShapeUtil extends BaseNodeShapeUtil<AcademicPerio
|
|||||||
h: 300,
|
h: 300,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Academic Period',
|
__primarylabel__: 'Academic Period',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
name: '',
|
name: '',
|
||||||
date: '',
|
date: '',
|
||||||
start_time: '',
|
start_time: '',
|
||||||
end_time: '',
|
end_time: '',
|
||||||
period_code: '',
|
period_code: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -820,13 +819,13 @@ export class RegistrationPeriodNodeShapeUtil extends BaseNodeShapeUtil<Registrat
|
|||||||
h: 200,
|
h: 200,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Registration Period',
|
__primarylabel__: 'Registration Period',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
name: '',
|
name: '',
|
||||||
date: '',
|
date: '',
|
||||||
start_time: '',
|
start_time: '',
|
||||||
end_time: '',
|
end_time: '',
|
||||||
period_code: '',
|
period_code: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -845,8 +844,8 @@ export class TeacherTimetableNodeShapeUtil extends BaseNodeShapeUtil<TeacherTime
|
|||||||
h: 130,
|
h: 130,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Teacher Timetable',
|
__primarylabel__: 'Teacher Timetable',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -867,13 +866,13 @@ export class TimetableLessonNodeShapeUtil extends BaseNodeShapeUtil<TimetableLes
|
|||||||
h: 250,
|
h: 250,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Timetable Lesson',
|
__primarylabel__: 'Timetable Lesson',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
subject_class: '',
|
subject_class: '',
|
||||||
date: '',
|
date: '',
|
||||||
start_time: '',
|
start_time: '',
|
||||||
end_time: '',
|
end_time: '',
|
||||||
period_code: '',
|
period_code: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
@ -891,7 +890,7 @@ export class PlannedLessonNodeShapeUtil extends BaseNodeShapeUtil<PlannedLessonN
|
|||||||
h: 250,
|
h: 250,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
__primarylabel__: 'Planned Lesson',
|
__primarylabel__: 'Planned Lesson',
|
||||||
unique_id: '',
|
uuid_string: '',
|
||||||
date: '',
|
date: '',
|
||||||
start_time: '',
|
start_time: '',
|
||||||
end_time: '',
|
end_time: '',
|
||||||
@ -909,7 +908,7 @@ export class PlannedLessonNodeShapeUtil extends BaseNodeShapeUtil<PlannedLessonN
|
|||||||
learning_statements: '',
|
learning_statements: '',
|
||||||
learning_resource_codes: '',
|
learning_resource_codes: '',
|
||||||
learning_resources: '',
|
learning_resources: '',
|
||||||
path: '',
|
node_storage_path: '',
|
||||||
created: '',
|
created: '',
|
||||||
merged: '',
|
merged: '',
|
||||||
}
|
}
|
||||||
|
|||||||
@ -63,7 +63,7 @@ const graphState = {
|
|||||||
|
|
||||||
addNode: (shape: any) => {
|
addNode: (shape: any) => {
|
||||||
console.log("Adding shape to graphState:", shape);
|
console.log("Adding shape to graphState:", shape);
|
||||||
const id = shape.props.unique_id;
|
const id = shape.props.uuid_string;
|
||||||
console.log("Adding node to graphState:", id);
|
console.log("Adding node to graphState:", id);
|
||||||
graphState.g.setNode(id, {
|
graphState.g.setNode(id, {
|
||||||
label: id,
|
label: id,
|
||||||
|
|||||||
@ -8,7 +8,7 @@ interface NodeComponentProps<T extends AllNodeShapes = AllNodeShapes> {
|
|||||||
|
|
||||||
interface BaseNodeProps {
|
interface BaseNodeProps {
|
||||||
__primarylabel__: string;
|
__primarylabel__: string;
|
||||||
unique_id: string;
|
uuid_string: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface TeacherNodeProps extends BaseNodeProps {
|
interface TeacherNodeProps extends BaseNodeProps {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user