@vocollege/app 0.0.110 → 0.0.113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/modules/Services/I18n/strings.json +28 -3
- package/dist/modules/VoApi/GraphClient.js +20 -1
- package/dist/modules/VoApi/graphql.d.ts +2 -0
- package/dist/modules/VoApi/graphql.js +2 -0
- package/dist/modules/VoApi/mutations/educations.d.ts +3 -0
- package/dist/modules/VoApi/mutations/educations.js +13 -0
- package/dist/modules/VoApi/queries/educations.d.ts +3 -0
- package/dist/modules/VoApi/queries/educations.js +12 -0
- package/dist/modules/VoApi/queries/vogroups.js +1 -1
- package/package.json +1 -1
- package/src/modules/Services/I18n/strings.json +28 -3
- package/src/modules/VoApi/GraphClient.ts +20 -1
- package/src/modules/VoApi/graphql.ts +2 -0
- package/src/modules/VoApi/mutations/educations.ts +29 -0
- package/src/modules/VoApi/queries/educations.ts +41 -0
- package/src/modules/VoApi/queries/vogroups.ts +17 -0
|
@@ -62,6 +62,17 @@
|
|
|
62
62
|
"articleDeleted": "Artikeln har raderats"
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
|
+
"education": {
|
|
66
|
+
"label": "Utbildning",
|
|
67
|
+
"labels": {
|
|
68
|
+
"educations": "Utbildningar",
|
|
69
|
+
"createEducation": "Skapa utbildning"
|
|
70
|
+
},
|
|
71
|
+
"messages": {
|
|
72
|
+
"educationSaved": "Utbildningen har sparats",
|
|
73
|
+
"educationDeleted": "Utbildningen har raderats"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
65
76
|
"page": {
|
|
66
77
|
"label": "Sida",
|
|
67
78
|
"labels": {
|
|
@@ -303,7 +314,8 @@
|
|
|
303
314
|
"groupPermissions": "Gruppbehörigheter",
|
|
304
315
|
"contacts": "Kontakter",
|
|
305
316
|
"groupAffiliation": "Grupptillhörighet",
|
|
306
|
-
"educatorCategory": "Typ av utbildare",
|
|
317
|
+
"educatorCategory": "Typ av utbildare (gammal)",
|
|
318
|
+
"educatorType": "Typ av utbildare",
|
|
307
319
|
"currentGroup": "Aktuell grupp",
|
|
308
320
|
"noGroup": "Ingen grupp är vald",
|
|
309
321
|
"startPage": "Startsida",
|
|
@@ -320,7 +332,8 @@
|
|
|
320
332
|
"frontPageIntro": "Startsidan för denna grupp när den är aktiv som en VoSida.",
|
|
321
333
|
"userAlreadyExistsGetInTouch": "Om användaren du försöker skapa redan finns i huvuddatabasen, då behöver du kontakta kansliet så den användaren kan läggas till på nuvarande VoSida.",
|
|
322
334
|
"userComesFromCentralDatabase": "Användarna nedan kommer från VO-Colleges centrala databas. Om du raderar en användare här så kommer den även att raderas centralt.",
|
|
323
|
-
"parentGroupsHelper": "Välj en eller flera grupper som denna grupp ska tillhöra, för att skapa en hierarki, t ex ett lokalt college ska ha ett regionalt college som 'Grupptillhörighet'."
|
|
335
|
+
"parentGroupsHelper": "Välj en eller flera grupper som denna grupp ska tillhöra, för att skapa en hierarki, t ex ett lokalt college ska ha ett regionalt college som 'Grupptillhörighet'.",
|
|
336
|
+
"doNotUseOldCategories": "Detta fält är 'den gamla typen' som kommer att raderas så småningom. Det går inte att ändra detta fält."
|
|
324
337
|
},
|
|
325
338
|
"categories": {
|
|
326
339
|
"region": "Regionalt college",
|
|
@@ -329,6 +342,16 @@
|
|
|
329
342
|
"employer": "Arbetsgivare",
|
|
330
343
|
"other": "Annat"
|
|
331
344
|
},
|
|
345
|
+
"educatorTypes": {
|
|
346
|
+
"kom_gym": "Kommunal Gymnasium",
|
|
347
|
+
"fri_gym": "Friskola, Gymnasium",
|
|
348
|
+
"kom_vux": "Kommunal vuxenutbildning",
|
|
349
|
+
"fri_vux": "Vuxenutbildning, fristående",
|
|
350
|
+
"yrkeshogskola": "Yrkeshögskola",
|
|
351
|
+
"folkhogskola": "Folkhögskola",
|
|
352
|
+
"arb_utb": "Arbetsmarknadsutbildning",
|
|
353
|
+
"other": "Annan utbildning"
|
|
354
|
+
},
|
|
332
355
|
"educatorCategories": {
|
|
333
356
|
"gym_vo": "Gymnasium VO",
|
|
334
357
|
"gym_bf": "Gymnasium BF",
|
|
@@ -736,7 +759,9 @@
|
|
|
736
759
|
"validig": "Validig",
|
|
737
760
|
"from": "Från",
|
|
738
761
|
"to": "Till",
|
|
739
|
-
"apps": "Appar"
|
|
762
|
+
"apps": "Appar",
|
|
763
|
+
"code": "Kod",
|
|
764
|
+
"new": "Ny"
|
|
740
765
|
},
|
|
741
766
|
"diploma": {
|
|
742
767
|
"label": "Diplom",
|
|
@@ -113,7 +113,26 @@ var GraphClient = /** @class */ (function () {
|
|
|
113
113
|
// const links = this.getGraphClientLinks(getToken, refreshToken);
|
|
114
114
|
var links = this.getGraphClientLinks(params);
|
|
115
115
|
return new client_1.ApolloClient({
|
|
116
|
-
cache: new client_1.InMemoryCache(
|
|
116
|
+
cache: new client_1.InMemoryCache({
|
|
117
|
+
typePolicies: {
|
|
118
|
+
Education: {
|
|
119
|
+
keyFields: [
|
|
120
|
+
"id",
|
|
121
|
+
"pivot",
|
|
122
|
+
["education_usage_id", "education_usage_type", "field"],
|
|
123
|
+
],
|
|
124
|
+
},
|
|
125
|
+
// PivotEducation: {
|
|
126
|
+
// // keyFields: ["education_usage_id"],
|
|
127
|
+
// keyFields: [
|
|
128
|
+
// "education_id",
|
|
129
|
+
// "education_usage_id",
|
|
130
|
+
// "education_usage_type",
|
|
131
|
+
// "field",
|
|
132
|
+
// ],
|
|
133
|
+
// },
|
|
134
|
+
},
|
|
135
|
+
}),
|
|
117
136
|
link: (0, client_1.from)([
|
|
118
137
|
links.errorLink,
|
|
119
138
|
links.authLink,
|
|
@@ -4,6 +4,7 @@ export * from "./queries/acl";
|
|
|
4
4
|
export * from "./queries/books";
|
|
5
5
|
export * from "./queries/cards";
|
|
6
6
|
export * from "./queries/events";
|
|
7
|
+
export * from "./queries/educations";
|
|
7
8
|
export * from "./queries/help";
|
|
8
9
|
export * from "./queries/navigation";
|
|
9
10
|
export * from "./queries/pages";
|
|
@@ -22,6 +23,7 @@ export * from "./mutations/articles";
|
|
|
22
23
|
export * from "./mutations/books";
|
|
23
24
|
export * from "./mutations/cards";
|
|
24
25
|
export * from "./mutations/events";
|
|
26
|
+
export * from "./mutations/educations";
|
|
25
27
|
export * from "./mutations/navigation";
|
|
26
28
|
export * from "./mutations/newsletter";
|
|
27
29
|
export * from "./mutations/pages";
|
|
@@ -27,6 +27,7 @@ __exportStar(require("./queries/acl"), exports);
|
|
|
27
27
|
__exportStar(require("./queries/books"), exports);
|
|
28
28
|
__exportStar(require("./queries/cards"), exports);
|
|
29
29
|
__exportStar(require("./queries/events"), exports);
|
|
30
|
+
__exportStar(require("./queries/educations"), exports);
|
|
30
31
|
__exportStar(require("./queries/help"), exports);
|
|
31
32
|
__exportStar(require("./queries/navigation"), exports);
|
|
32
33
|
__exportStar(require("./queries/pages"), exports);
|
|
@@ -46,6 +47,7 @@ __exportStar(require("./mutations/articles"), exports);
|
|
|
46
47
|
__exportStar(require("./mutations/books"), exports);
|
|
47
48
|
__exportStar(require("./mutations/cards"), exports);
|
|
48
49
|
__exportStar(require("./mutations/events"), exports);
|
|
50
|
+
__exportStar(require("./mutations/educations"), exports);
|
|
49
51
|
__exportStar(require("./mutations/navigation"), exports);
|
|
50
52
|
__exportStar(require("./mutations/newsletter"), exports);
|
|
51
53
|
__exportStar(require("./mutations/pages"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.DELETE_EDUCATION = exports.UPDATE_EDUCATION = exports.CREATE_EDUCATION = void 0;
|
|
8
|
+
var client_1 = require("@apollo/client");
|
|
9
|
+
var educations_1 = require("../queries/educations");
|
|
10
|
+
exports.CREATE_EDUCATION = (0, client_1.gql)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n mutation CreateEducation($input: UpdateEducationInput!) {\n createEducation(input: $input) {\n ...EducationsFields\n }\n }\n ", "\n"], ["\n mutation CreateEducation($input: UpdateEducationInput!) {\n createEducation(input: $input) {\n ...EducationsFields\n }\n }\n ", "\n"])), educations_1.GET_EDUCATIONS_FIELDS);
|
|
11
|
+
exports.UPDATE_EDUCATION = (0, client_1.gql)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n mutation UpdateEducation($id: ID!, $input: UpdateEducationInput!) {\n updateEducation(id: $id, input: $input) {\n ...EducationsFields\n }\n }\n ", "\n"], ["\n mutation UpdateEducation($id: ID!, $input: UpdateEducationInput!) {\n updateEducation(id: $id, input: $input) {\n ...EducationsFields\n }\n }\n ", "\n"])), educations_1.GET_EDUCATIONS_FIELDS);
|
|
12
|
+
exports.DELETE_EDUCATION = (0, client_1.gql)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n mutation DeleteEducation($id: ID!) {\n deleteEducation(id: $id) {\n id\n }\n }\n"], ["\n mutation DeleteEducation($id: ID!) {\n deleteEducation(id: $id) {\n id\n }\n }\n"])));
|
|
13
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.GET_EDUCATIONS = exports.GET_EDUCATION = exports.GET_EDUCATIONS_FIELDS = void 0;
|
|
8
|
+
var client_1 = require("@apollo/client");
|
|
9
|
+
exports.GET_EDUCATIONS_FIELDS = (0, client_1.gql)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n fragment EducationsFields on Education {\n id\n status\n title\n code\n created_at\n updated_at\n }\n"], ["\n fragment EducationsFields on Education {\n id\n status\n title\n code\n created_at\n updated_at\n }\n"])));
|
|
10
|
+
exports.GET_EDUCATION = (0, client_1.gql)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n query Education($id: ID!) {\n education(id: $id) {\n ...EducationsFields\n }\n }\n ", "\n"], ["\n query Education($id: ID!) {\n education(id: $id) {\n ...EducationsFields\n }\n }\n ", "\n"])), exports.GET_EDUCATIONS_FIELDS);
|
|
11
|
+
exports.GET_EDUCATIONS = (0, client_1.gql)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n query Educations(\n $search: String\n $page: Int\n $limit: Int\n $orderBy: [GetEducationsOrderByClause]\n ) {\n educations(search: $search, page: $page, limit: $limit, orderBy: $orderBy) {\n paginatorInfo {\n total\n currentPage\n hasMorePages\n }\n data {\n ...EducationsFields\n }\n }\n }\n ", "\n"], ["\n query Educations(\n $search: String\n $page: Int\n $limit: Int\n $orderBy: [GetEducationsOrderByClause]\n ) {\n educations(search: $search, page: $page, limit: $limit, orderBy: $orderBy) {\n paginatorInfo {\n total\n currentPage\n hasMorePages\n }\n data {\n ...EducationsFields\n }\n }\n }\n ", "\n"])), exports.GET_EDUCATIONS_FIELDS);
|
|
12
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -6,7 +6,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.GET_GROUPS_PERMISSIONS = exports.GET_GROUPS_ROLES = exports.GET_GROUPS_ROLE = exports.GET_GROUPS_ACL = exports.GET_GROUPS = exports.GET_AVAILABLE_GROUPS = exports.GET_GROUP = void 0;
|
|
8
8
|
var client_1 = require("@apollo/client");
|
|
9
|
-
exports.GET_GROUP = (0, client_1.gql)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n query Group($id: ID!, $categories: [String]) {\n group(id: $id) {\n id\n name\n title\n description\n body\n category\n docs\n website\n educator_category\n certified\n status\n url\n created_at\n updated_at\n parentGroupId\n parentGroups {\n id\n name\n title\n category\n }\n location {\n id\n latitude\n longitude\n }\n logo {\n id\n title\n filename\n filesize\n filetype\n url\n }\n logo2 {\n id\n title\n filename\n filesize\n filetype\n url\n }\n logo3 {\n id\n title\n filename\n filesize\n filetype\n url\n }\n users {\n id\n name\n email\n firstname\n lastname\n type\n groupRoles {\n id\n label\n type\n }\n }\n contacts {\n id\n title\n type\n }\n vopage\n front_title\n front_body\n images {\n id\n title\n filename\n filesize\n filetype\n url\n }\n }\n allGroups(categories: $categories) {\n id\n title\n }\n }\n"], ["\n query Group($id: ID!, $categories: [String]) {\n group(id: $id) {\n id\n name\n title\n description\n body\n category\n docs\n website\n educator_category\n certified\n status\n url\n created_at\n updated_at\n parentGroupId\n parentGroups {\n id\n name\n title\n category\n }\n location {\n id\n latitude\n longitude\n }\n logo {\n id\n title\n filename\n filesize\n filetype\n url\n }\n logo2 {\n id\n title\n filename\n filesize\n filetype\n url\n }\n logo3 {\n id\n title\n filename\n filesize\n filetype\n url\n }\n users {\n id\n name\n email\n firstname\n lastname\n type\n groupRoles {\n id\n label\n type\n }\n }\n contacts {\n id\n title\n type\n }\n vopage\n front_title\n front_body\n images {\n id\n title\n filename\n filesize\n filetype\n url\n }\n }\n allGroups(categories: $categories) {\n id\n title\n }\n }\n"])));
|
|
9
|
+
exports.GET_GROUP = (0, client_1.gql)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n query Group($id: ID!, $categories: [String]) {\n group(id: $id) {\n id\n name\n title\n description\n body\n category\n docs\n website\n educator_category\n educator_type\n certified\n status\n url\n created_at\n updated_at\n parentGroupId\n parentGroups {\n id\n name\n title\n category\n }\n location {\n id\n latitude\n longitude\n }\n logo {\n id\n title\n filename\n filesize\n filetype\n url\n }\n logo2 {\n id\n title\n filename\n filesize\n filetype\n url\n }\n logo3 {\n id\n title\n filename\n filesize\n filetype\n url\n }\n users {\n id\n name\n email\n firstname\n lastname\n type\n groupRoles {\n id\n label\n type\n }\n }\n contacts {\n id\n title\n type\n }\n vopage\n front_title\n front_body\n images {\n id\n title\n filename\n filesize\n filetype\n url\n }\n educations {\n id\n title\n code\n type\n pivot {\n education_id\n education_usage_id\n education_usage_type\n field\n certified\n comments\n }\n }\n }\n allGroups(categories: $categories) {\n id\n title\n }\n }\n"], ["\n query Group($id: ID!, $categories: [String]) {\n group(id: $id) {\n id\n name\n title\n description\n body\n category\n docs\n website\n educator_category\n educator_type\n certified\n status\n url\n created_at\n updated_at\n parentGroupId\n parentGroups {\n id\n name\n title\n category\n }\n location {\n id\n latitude\n longitude\n }\n logo {\n id\n title\n filename\n filesize\n filetype\n url\n }\n logo2 {\n id\n title\n filename\n filesize\n filetype\n url\n }\n logo3 {\n id\n title\n filename\n filesize\n filetype\n url\n }\n users {\n id\n name\n email\n firstname\n lastname\n type\n groupRoles {\n id\n label\n type\n }\n }\n contacts {\n id\n title\n type\n }\n vopage\n front_title\n front_body\n images {\n id\n title\n filename\n filesize\n filetype\n url\n }\n educations {\n id\n title\n code\n type\n pivot {\n education_id\n education_usage_id\n education_usage_type\n field\n certified\n comments\n }\n }\n }\n allGroups(categories: $categories) {\n id\n title\n }\n }\n"])));
|
|
10
10
|
exports.GET_AVAILABLE_GROUPS = (0, client_1.gql)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n query Group($categories: [String], $byPassMembership: Boolean) {\n allGroups(categories: $categories, byPassMembership: $byPassMembership) {\n id\n title\n category\n }\n }\n"], ["\n query Group($categories: [String], $byPassMembership: Boolean) {\n allGroups(categories: $categories, byPassMembership: $byPassMembership) {\n id\n title\n category\n }\n }\n"])));
|
|
11
11
|
exports.GET_GROUPS = (0, client_1.gql)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n query Groups(\n $search: String\n $page: Int\n $limit: Int\n $orderBy: [GetGroupsOrderByClause]\n $filters: [GetGroupsFilter]\n ) {\n groups(\n search: $search\n page: $page\n limit: $limit\n orderBy: $orderBy\n filters: $filters\n ) {\n paginatorInfo {\n total\n currentPage\n hasMorePages\n }\n data {\n id\n name\n title\n category\n status\n vopage\n created_at\n updated_at\n }\n }\n }\n"], ["\n query Groups(\n $search: String\n $page: Int\n $limit: Int\n $orderBy: [GetGroupsOrderByClause]\n $filters: [GetGroupsFilter]\n ) {\n groups(\n search: $search\n page: $page\n limit: $limit\n orderBy: $orderBy\n filters: $filters\n ) {\n paginatorInfo {\n total\n currentPage\n hasMorePages\n }\n data {\n id\n name\n title\n category\n status\n vopage\n created_at\n updated_at\n }\n }\n }\n"])));
|
|
12
12
|
exports.GET_GROUPS_ACL = (0, client_1.gql)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n query GetGroupsAcl {\n groupsRoles {\n id\n name\n label\n }\n groupsPermissions {\n id\n subject\n name\n label\n roles {\n id\n }\n }\n }\n"], ["\n query GetGroupsAcl {\n groupsRoles {\n id\n name\n label\n }\n groupsPermissions {\n id\n subject\n name\n label\n roles {\n id\n }\n }\n }\n"])));
|
package/package.json
CHANGED
|
@@ -62,6 +62,17 @@
|
|
|
62
62
|
"articleDeleted": "Artikeln har raderats"
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
|
+
"education": {
|
|
66
|
+
"label": "Utbildning",
|
|
67
|
+
"labels": {
|
|
68
|
+
"educations": "Utbildningar",
|
|
69
|
+
"createEducation": "Skapa utbildning"
|
|
70
|
+
},
|
|
71
|
+
"messages": {
|
|
72
|
+
"educationSaved": "Utbildningen har sparats",
|
|
73
|
+
"educationDeleted": "Utbildningen har raderats"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
65
76
|
"page": {
|
|
66
77
|
"label": "Sida",
|
|
67
78
|
"labels": {
|
|
@@ -303,7 +314,8 @@
|
|
|
303
314
|
"groupPermissions": "Gruppbehörigheter",
|
|
304
315
|
"contacts": "Kontakter",
|
|
305
316
|
"groupAffiliation": "Grupptillhörighet",
|
|
306
|
-
"educatorCategory": "Typ av utbildare",
|
|
317
|
+
"educatorCategory": "Typ av utbildare (gammal)",
|
|
318
|
+
"educatorType": "Typ av utbildare",
|
|
307
319
|
"currentGroup": "Aktuell grupp",
|
|
308
320
|
"noGroup": "Ingen grupp är vald",
|
|
309
321
|
"startPage": "Startsida",
|
|
@@ -320,7 +332,8 @@
|
|
|
320
332
|
"frontPageIntro": "Startsidan för denna grupp när den är aktiv som en VoSida.",
|
|
321
333
|
"userAlreadyExistsGetInTouch": "Om användaren du försöker skapa redan finns i huvuddatabasen, då behöver du kontakta kansliet så den användaren kan läggas till på nuvarande VoSida.",
|
|
322
334
|
"userComesFromCentralDatabase": "Användarna nedan kommer från VO-Colleges centrala databas. Om du raderar en användare här så kommer den även att raderas centralt.",
|
|
323
|
-
"parentGroupsHelper": "Välj en eller flera grupper som denna grupp ska tillhöra, för att skapa en hierarki, t ex ett lokalt college ska ha ett regionalt college som 'Grupptillhörighet'."
|
|
335
|
+
"parentGroupsHelper": "Välj en eller flera grupper som denna grupp ska tillhöra, för att skapa en hierarki, t ex ett lokalt college ska ha ett regionalt college som 'Grupptillhörighet'.",
|
|
336
|
+
"doNotUseOldCategories": "Detta fält är 'den gamla typen' som kommer att raderas så småningom. Det går inte att ändra detta fält."
|
|
324
337
|
},
|
|
325
338
|
"categories": {
|
|
326
339
|
"region": "Regionalt college",
|
|
@@ -329,6 +342,16 @@
|
|
|
329
342
|
"employer": "Arbetsgivare",
|
|
330
343
|
"other": "Annat"
|
|
331
344
|
},
|
|
345
|
+
"educatorTypes": {
|
|
346
|
+
"kom_gym": "Kommunal Gymnasium",
|
|
347
|
+
"fri_gym": "Friskola, Gymnasium",
|
|
348
|
+
"kom_vux": "Kommunal vuxenutbildning",
|
|
349
|
+
"fri_vux": "Vuxenutbildning, fristående",
|
|
350
|
+
"yrkeshogskola": "Yrkeshögskola",
|
|
351
|
+
"folkhogskola": "Folkhögskola",
|
|
352
|
+
"arb_utb": "Arbetsmarknadsutbildning",
|
|
353
|
+
"other": "Annan utbildning"
|
|
354
|
+
},
|
|
332
355
|
"educatorCategories": {
|
|
333
356
|
"gym_vo": "Gymnasium VO",
|
|
334
357
|
"gym_bf": "Gymnasium BF",
|
|
@@ -736,7 +759,9 @@
|
|
|
736
759
|
"validig": "Validig",
|
|
737
760
|
"from": "Från",
|
|
738
761
|
"to": "Till",
|
|
739
|
-
"apps": "Appar"
|
|
762
|
+
"apps": "Appar",
|
|
763
|
+
"code": "Kod",
|
|
764
|
+
"new": "Ny"
|
|
740
765
|
},
|
|
741
766
|
"diploma": {
|
|
742
767
|
"label": "Diplom",
|
|
@@ -67,7 +67,26 @@ class GraphClient {
|
|
|
67
67
|
const links = this.getGraphClientLinks(params);
|
|
68
68
|
|
|
69
69
|
return new ApolloClient({
|
|
70
|
-
cache: new InMemoryCache(
|
|
70
|
+
cache: new InMemoryCache({
|
|
71
|
+
typePolicies: {
|
|
72
|
+
Education: {
|
|
73
|
+
keyFields: [
|
|
74
|
+
"id",
|
|
75
|
+
"pivot",
|
|
76
|
+
["education_usage_id", "education_usage_type", "field"],
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
// PivotEducation: {
|
|
80
|
+
// // keyFields: ["education_usage_id"],
|
|
81
|
+
// keyFields: [
|
|
82
|
+
// "education_id",
|
|
83
|
+
// "education_usage_id",
|
|
84
|
+
// "education_usage_type",
|
|
85
|
+
// "field",
|
|
86
|
+
// ],
|
|
87
|
+
// },
|
|
88
|
+
},
|
|
89
|
+
}),
|
|
71
90
|
link: from([
|
|
72
91
|
links.errorLink,
|
|
73
92
|
links.authLink,
|
|
@@ -7,6 +7,7 @@ export * from "./queries/acl";
|
|
|
7
7
|
export * from "./queries/books";
|
|
8
8
|
export * from "./queries/cards";
|
|
9
9
|
export * from "./queries/events";
|
|
10
|
+
export * from "./queries/educations";
|
|
10
11
|
export * from "./queries/help";
|
|
11
12
|
export * from "./queries/navigation";
|
|
12
13
|
export * from "./queries/pages";
|
|
@@ -27,6 +28,7 @@ export * from "./mutations/articles";
|
|
|
27
28
|
export * from "./mutations/books";
|
|
28
29
|
export * from "./mutations/cards";
|
|
29
30
|
export * from "./mutations/events";
|
|
31
|
+
export * from "./mutations/educations";
|
|
30
32
|
export * from "./mutations/navigation";
|
|
31
33
|
export * from "./mutations/newsletter";
|
|
32
34
|
export * from "./mutations/pages";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { gql } from "@apollo/client";
|
|
2
|
+
|
|
3
|
+
import { GET_EDUCATIONS_FIELDS } from "../queries/educations";
|
|
4
|
+
|
|
5
|
+
export const CREATE_EDUCATION = gql`
|
|
6
|
+
mutation CreateEducation($input: UpdateEducationInput!) {
|
|
7
|
+
createEducation(input: $input) {
|
|
8
|
+
...EducationsFields
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
${GET_EDUCATIONS_FIELDS}
|
|
12
|
+
`;
|
|
13
|
+
|
|
14
|
+
export const UPDATE_EDUCATION = gql`
|
|
15
|
+
mutation UpdateEducation($id: ID!, $input: UpdateEducationInput!) {
|
|
16
|
+
updateEducation(id: $id, input: $input) {
|
|
17
|
+
...EducationsFields
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
${GET_EDUCATIONS_FIELDS}
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
export const DELETE_EDUCATION = gql`
|
|
24
|
+
mutation DeleteEducation($id: ID!) {
|
|
25
|
+
deleteEducation(id: $id) {
|
|
26
|
+
id
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { gql } from "@apollo/client";
|
|
2
|
+
|
|
3
|
+
export const GET_EDUCATIONS_FIELDS = gql`
|
|
4
|
+
fragment EducationsFields on Education {
|
|
5
|
+
id
|
|
6
|
+
status
|
|
7
|
+
title
|
|
8
|
+
code
|
|
9
|
+
created_at
|
|
10
|
+
updated_at
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
13
|
+
export const GET_EDUCATION = gql`
|
|
14
|
+
query Education($id: ID!) {
|
|
15
|
+
education(id: $id) {
|
|
16
|
+
...EducationsFields
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
${GET_EDUCATIONS_FIELDS}
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
export const GET_EDUCATIONS = gql`
|
|
23
|
+
query Educations(
|
|
24
|
+
$search: String
|
|
25
|
+
$page: Int
|
|
26
|
+
$limit: Int
|
|
27
|
+
$orderBy: [GetEducationsOrderByClause]
|
|
28
|
+
) {
|
|
29
|
+
educations(search: $search, page: $page, limit: $limit, orderBy: $orderBy) {
|
|
30
|
+
paginatorInfo {
|
|
31
|
+
total
|
|
32
|
+
currentPage
|
|
33
|
+
hasMorePages
|
|
34
|
+
}
|
|
35
|
+
data {
|
|
36
|
+
...EducationsFields
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
${GET_EDUCATIONS_FIELDS}
|
|
41
|
+
`;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { gql } from "@apollo/client";
|
|
2
2
|
|
|
3
|
+
import { GET_EDUCATIONS_FIELDS } from "./educations";
|
|
4
|
+
|
|
3
5
|
export const GET_GROUP = gql`
|
|
4
6
|
query Group($id: ID!, $categories: [String]) {
|
|
5
7
|
group(id: $id) {
|
|
@@ -12,6 +14,7 @@ export const GET_GROUP = gql`
|
|
|
12
14
|
docs
|
|
13
15
|
website
|
|
14
16
|
educator_category
|
|
17
|
+
educator_type
|
|
15
18
|
certified
|
|
16
19
|
status
|
|
17
20
|
url
|
|
@@ -82,6 +85,20 @@ export const GET_GROUP = gql`
|
|
|
82
85
|
filetype
|
|
83
86
|
url
|
|
84
87
|
}
|
|
88
|
+
educations {
|
|
89
|
+
id
|
|
90
|
+
title
|
|
91
|
+
code
|
|
92
|
+
type
|
|
93
|
+
pivot {
|
|
94
|
+
education_id
|
|
95
|
+
education_usage_id
|
|
96
|
+
education_usage_type
|
|
97
|
+
field
|
|
98
|
+
certified
|
|
99
|
+
comments
|
|
100
|
+
}
|
|
101
|
+
}
|
|
85
102
|
}
|
|
86
103
|
allGroups(categories: $categories) {
|
|
87
104
|
id
|