phx-uikit 1.0.20 → 1.0.21
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/cjs/components/Login/Login.js +13 -31
- package/dist/cjs/components/Login/Login.js.map +1 -1
- package/dist/cjs/query/gql.d.ts +0 -1
- package/dist/cjs/query/gql.js +2 -3
- package/dist/cjs/query/gql.js.map +1 -1
- package/dist/esm/components/Login/Login.js +14 -32
- package/dist/esm/components/Login/Login.js.map +1 -1
- package/dist/esm/query/gql.d.ts +0 -1
- package/dist/esm/query/gql.js +1 -2
- package/dist/esm/query/gql.js.map +1 -1
- package/package.json +1 -1
|
@@ -14,7 +14,6 @@ var gql_1 = require("../../query/gql");
|
|
|
14
14
|
var saveCookiesClient_1 = tslib_1.__importDefault(require("../Func/saveCookiesClient"));
|
|
15
15
|
var Checkbox_1 = require("../Checkbox");
|
|
16
16
|
var login_style_1 = tslib_1.__importDefault(require("./login-style"));
|
|
17
|
-
var clientQueryV2_1 = tslib_1.__importDefault(require("../Func/clientQueryV2"));
|
|
18
17
|
var getLoginInfo_1 = tslib_1.__importDefault(require("../Func/getLoginInfo"));
|
|
19
18
|
var js_cookie_1 = tslib_1.__importDefault(require("js-cookie"));
|
|
20
19
|
var PHXLogin = function (props) {
|
|
@@ -26,29 +25,12 @@ var PHXLogin = function (props) {
|
|
|
26
25
|
var schoolLogo = (0, read_env_config_1.getEnv)('NEXT_PUBLIC_ENV_LOGIN_LOGO', process.env.NEXT_PUBLIC_ENV_LOGIN_LOGO);
|
|
27
26
|
var _d = (0, react_hook_form_1.useForm)(), handleSubmit = _d.handleSubmit, register = _d.register, errors = _d.formState.errors;
|
|
28
27
|
var uri = (0, read_env_config_1.getEnv)('NEXT_PUBLIC_API_GATEWAY', process.env.NEXT_PUBLIC_API_GATEWAY);
|
|
29
|
-
var GetProfile = (0, client_1.useLazyQuery)(gql_1.queryProfile, {
|
|
30
|
-
fetchPolicy: 'network-only',
|
|
31
|
-
notifyOnNetworkStatusChange: true
|
|
32
|
-
})[0];
|
|
33
28
|
var getTokenInfo = function (email, password) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
variables: {
|
|
40
|
-
email: email
|
|
41
|
-
}
|
|
42
|
-
})];
|
|
43
|
-
case 1:
|
|
44
|
-
authenProfile = _g.sent();
|
|
45
|
-
authenTeacher = (_c = (_b = (_a = authenProfile.data) === null || _a === void 0 ? void 0 : _a.profile_teacher) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.is_quit_job;
|
|
46
|
-
authenParent = (_f = (_e = (_d = authenProfile.data) === null || _d === void 0 ? void 0 : _d.profile_staff) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.is_quit_job;
|
|
47
|
-
if (authenTeacher || authenParent)
|
|
48
|
-
return [2 /*return*/];
|
|
49
|
-
_g.label = 2;
|
|
50
|
-
case 2:
|
|
51
|
-
_g.trys.push([2, 6, , 7]);
|
|
29
|
+
var tokenInfoRes, error_1;
|
|
30
|
+
return tslib_1.__generator(this, function (_a) {
|
|
31
|
+
switch (_a.label) {
|
|
32
|
+
case 0:
|
|
33
|
+
_a.trys.push([0, 4, , 5]);
|
|
52
34
|
return [4 /*yield*/, fetch("".concat(uri, "/authen/login"), {
|
|
53
35
|
headers: {
|
|
54
36
|
'Content-Type': 'application/json'
|
|
@@ -59,17 +41,17 @@ var PHXLogin = function (props) {
|
|
|
59
41
|
password: password
|
|
60
42
|
})
|
|
61
43
|
})];
|
|
62
|
-
case
|
|
63
|
-
tokenInfoRes =
|
|
64
|
-
if (!tokenInfoRes) return [3 /*break*/,
|
|
44
|
+
case 1:
|
|
45
|
+
tokenInfoRes = _a.sent();
|
|
46
|
+
if (!tokenInfoRes) return [3 /*break*/, 3];
|
|
65
47
|
return [4 /*yield*/, tokenInfoRes.json()];
|
|
66
|
-
case
|
|
67
|
-
case
|
|
68
|
-
case
|
|
69
|
-
error_1 =
|
|
48
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
49
|
+
case 3: return [3 /*break*/, 5];
|
|
50
|
+
case 4:
|
|
51
|
+
error_1 = _a.sent();
|
|
70
52
|
console.error(error_1);
|
|
71
53
|
return [2 /*return*/, null];
|
|
72
|
-
case
|
|
54
|
+
case 5: return [2 /*return*/];
|
|
73
55
|
}
|
|
74
56
|
});
|
|
75
57
|
}); };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Login.js","sourceRoot":"","sources":["../../../../src/components/Login/Login.tsx"],"names":[],"mappings":";;;;AAAA,qDAAkD;AAClD,yCAA6C;AAC7C,mDAAyC;AACzC,kCAAmC;AACnC,oCAAqC;AACrC,oCAAqC;AACrC,mDAAkE;AAClE,yDAA8C;AAC9C,
|
|
1
|
+
{"version":3,"file":"Login.js","sourceRoot":"","sources":["../../../../src/components/Login/Login.tsx"],"names":[],"mappings":";;;;AAAA,qDAAkD;AAClD,yCAA6C;AAC7C,mDAAyC;AACzC,kCAAmC;AACnC,oCAAqC;AACrC,oCAAqC;AACrC,mDAAkE;AAClE,yDAA8C;AAC9C,uCAA4C;AAC5C,wFAAyD;AACzD,wCAAyC;AACzC,sEAAsC;AACtC,8EAAuD;AACvD,gEAA+B;AAUxB,IAAM,QAAQ,GAAG,UAAC,KAAoB;IACnC,IAAA,IAAI,GAAgD,KAAK,KAArD,EAAE,MAAM,GAAwC,KAAK,OAA7C,EAAE,MAAM,GAAgC,KAAK,OAArC,EAAE,YAAY,GAAkB,KAAK,aAAvB,EAAE,WAAW,GAAK,KAAK,YAAV,CAAU;IAC3D,IAAA,KAA0B,IAAA,gBAAQ,EAAU,IAAI,CAAC,EAAhD,QAAQ,QAAA,EAAE,WAAW,QAA2B,CAAA;IACjD,IAAA,KAA8B,IAAA,gBAAQ,EAAU,KAAK,CAAC,EAArD,UAAU,QAAA,EAAE,aAAa,QAA4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QAAA,QAAQ,YAqLpB;AAED,qBAAe,gBAAQ,CAAA"}
|
package/dist/cjs/query/gql.d.ts
CHANGED
|
@@ -6,4 +6,3 @@ export declare const getActiveAndNextSchoolYear: import("@apollo/client").Docume
|
|
|
6
6
|
export declare const getTuitionDebtRecordByUserCode: import("@apollo/client").DocumentNode;
|
|
7
7
|
export declare const querySearchGlobal: import("@apollo/client").DocumentNode;
|
|
8
8
|
export declare const queryGetProfile: import("@apollo/client").DocumentNode;
|
|
9
|
-
export declare const queryProfile: import("@apollo/client").DocumentNode;
|
package/dist/cjs/query/gql.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
exports.__esModule = true;
|
|
3
|
-
exports.
|
|
3
|
+
exports.queryGetProfile = exports.querySearchGlobal = exports.getTuitionDebtRecordByUserCode = exports.getActiveAndNextSchoolYear = exports.querySchoolYear = exports.GET_PERMISSION_DETAIL_USER = exports.getCampaignName = exports.GET_SCHOOL = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var client_1 = require("@apollo/client");
|
|
6
6
|
var constants_1 = require("../utils/constants");
|
|
@@ -12,6 +12,5 @@ exports.getActiveAndNextSchoolYear = (0, client_1.gql)(templateObject_5 || (temp
|
|
|
12
12
|
exports.getTuitionDebtRecordByUserCode = (0, client_1.gql)(templateObject_6 || (templateObject_6 = tslib_1.__makeTemplateObject(["\n query GetTuitionDebtRecordByUserCode($user_code: String, $school_year_id: Int, $school_id: Int) {\n tuition_fee_debt_record(\n order_by: { school_term_id: asc }\n where: {\n deleted_at: { _is_null: true }\n school_id: { _eq: $school_id }\n user_code: { _eq: $user_code }\n school_term: { school_year_id: { _eq: $school_year_id } }\n }\n ) {\n total_promotion_service\n total_payment\n total_promotion_tuition_policy\n total_promotion_tuition_scholar_ship\n total_promotion_tuition_seniority\n total_promotion_early\n total_promotion_admission\n total_required_service\n total_not_required_service\n total_tuition\n last_period_debt_balance\n last_period_credit_balance\n status\n last_credit_balance\n last_debt_balance\n total_refund\n total_adjustment_refund\n total_adjustment_additional\n id\n status\n school_term {\n school_year {\n name\n code\n }\n name\n code\n coefficient\n id\n }\n profile_student {\n tuition_notice_delivered_emails(order_by: { created_at: desc }) {\n link_pdf_cdn\n tuition_notice_campaign {\n school_term_id\n }\n }\n }\n user_code\n }\n tuition_fee_debt_record_by_month(\n order_by: { month_id: asc }\n where: {\n deleted_at: { _is_null: true }\n school_id: { _eq: $school_id }\n user_code: { _eq: $user_code }\n school_month: { school_term: { school_year_id: { _eq: $school_year_id } } }\n }\n ) {\n total_promotion_service\n total_payment\n total_promotion_tuition_policy\n total_promotion_tuition_scholar_ship\n total_promotion_tuition_seniority\n total_promotion_early\n total_promotion_admission\n total_required_service\n total_not_required_service\n total_tuition\n last_period_debt_balance\n last_period_credit_balance\n status\n last_credit_balance\n last_debt_balance\n total_refund\n total_adjustment_refund\n total_adjustment_additional\n id\n status\n school_month {\n name\n }\n user_code\n }\n }\n"], ["\n query GetTuitionDebtRecordByUserCode($user_code: String, $school_year_id: Int, $school_id: Int) {\n tuition_fee_debt_record(\n order_by: { school_term_id: asc }\n where: {\n deleted_at: { _is_null: true }\n school_id: { _eq: $school_id }\n user_code: { _eq: $user_code }\n school_term: { school_year_id: { _eq: $school_year_id } }\n }\n ) {\n total_promotion_service\n total_payment\n total_promotion_tuition_policy\n total_promotion_tuition_scholar_ship\n total_promotion_tuition_seniority\n total_promotion_early\n total_promotion_admission\n total_required_service\n total_not_required_service\n total_tuition\n last_period_debt_balance\n last_period_credit_balance\n status\n last_credit_balance\n last_debt_balance\n total_refund\n total_adjustment_refund\n total_adjustment_additional\n id\n status\n school_term {\n school_year {\n name\n code\n }\n name\n code\n coefficient\n id\n }\n profile_student {\n tuition_notice_delivered_emails(order_by: { created_at: desc }) {\n link_pdf_cdn\n tuition_notice_campaign {\n school_term_id\n }\n }\n }\n user_code\n }\n tuition_fee_debt_record_by_month(\n order_by: { month_id: asc }\n where: {\n deleted_at: { _is_null: true }\n school_id: { _eq: $school_id }\n user_code: { _eq: $user_code }\n school_month: { school_term: { school_year_id: { _eq: $school_year_id } } }\n }\n ) {\n total_promotion_service\n total_payment\n total_promotion_tuition_policy\n total_promotion_tuition_scholar_ship\n total_promotion_tuition_seniority\n total_promotion_early\n total_promotion_admission\n total_required_service\n total_not_required_service\n total_tuition\n last_period_debt_balance\n last_period_credit_balance\n status\n last_credit_balance\n last_debt_balance\n total_refund\n total_adjustment_refund\n total_adjustment_additional\n id\n status\n school_month {\n name\n }\n user_code\n }\n }\n"])));
|
|
13
13
|
exports.querySearchGlobal = (0, client_1.gql)(templateObject_7 || (templateObject_7 = tslib_1.__makeTemplateObject(["\n query QuerySearchGlobal($school_id: Int, $searchValue: String) {\n profile_student(\n where: {\n _or: [\n { user_code: { _eq: $searchValue } }\n { user: { school_id: { _eq: $school_id }, deleted_at: { _is_null: true }, full_name: { _eq: $searchValue } } }\n ]\n }\n ) {\n user_code\n user {\n id\n user_roles(where: { deleted_at: { _is_null: true }, user: { deleted_at: { _is_null: true } } }) {\n role {\n name\n role_code\n }\n }\n classroom_students {\n classroom {\n name\n }\n }\n id\n full_name\n }\n }\n\n profile_parent(\n where: {\n _or: [\n { user: { email: { _eq: $searchValue } } }\n { user: { full_name: { _eq: $searchValue } } }\n { user: { phone_number: { _eq: $searchValue } } }\n ]\n deleted_at: { _is_null: true }\n user: { school_id: { _eq: $school_id }, deleted_at: { _is_null: true } }\n }\n ) {\n user {\n id\n full_name\n user_roles(where: { deleted_at: { _is_null: true }, user: { deleted_at: { _is_null: true } } }) {\n role {\n name\n role_code\n }\n }\n relationship_users(\n where: {\n deleted_at: { _is_null: true }\n user: { deleted_at: { _is_null: true } }\n userByStudentId: { deleted_at: { _is_null: true } }\n }\n ) {\n userByStudentId {\n full_name\n }\n }\n }\n }\n\n profile_teacher(\n where: {\n _or: [\n { user_code: { _eq: $searchValue } }\n { user: { email: { _eq: $searchValue } } }\n { user: { full_name: { _eq: $searchValue } } }\n { user: { phone_number: { _eq: $searchValue } } }\n ]\n deleted_at: { _is_null: true }\n user: { school_id: { _eq: $school_id }, deleted_at: { _is_null: true } }\n }\n ) {\n user {\n id\n full_name\n email\n phone_number\n user_roles(where: { deleted_at: { _is_null: true }, user: { deleted_at: { _is_null: true } } }) {\n role {\n name\n role_code\n }\n }\n relationship_users(\n where: {\n deleted_at: { _is_null: true }\n user: { deleted_at: { _is_null: true } }\n userByStudentId: { deleted_at: { _is_null: true } }\n }\n ) {\n userByStudentId {\n full_name\n }\n }\n }\n }\n }\n"], ["\n query QuerySearchGlobal($school_id: Int, $searchValue: String) {\n profile_student(\n where: {\n _or: [\n { user_code: { _eq: $searchValue } }\n { user: { school_id: { _eq: $school_id }, deleted_at: { _is_null: true }, full_name: { _eq: $searchValue } } }\n ]\n }\n ) {\n user_code\n user {\n id\n user_roles(where: { deleted_at: { _is_null: true }, user: { deleted_at: { _is_null: true } } }) {\n role {\n name\n role_code\n }\n }\n classroom_students {\n classroom {\n name\n }\n }\n id\n full_name\n }\n }\n\n profile_parent(\n where: {\n _or: [\n { user: { email: { _eq: $searchValue } } }\n { user: { full_name: { _eq: $searchValue } } }\n { user: { phone_number: { _eq: $searchValue } } }\n ]\n deleted_at: { _is_null: true }\n user: { school_id: { _eq: $school_id }, deleted_at: { _is_null: true } }\n }\n ) {\n user {\n id\n full_name\n user_roles(where: { deleted_at: { _is_null: true }, user: { deleted_at: { _is_null: true } } }) {\n role {\n name\n role_code\n }\n }\n relationship_users(\n where: {\n deleted_at: { _is_null: true }\n user: { deleted_at: { _is_null: true } }\n userByStudentId: { deleted_at: { _is_null: true } }\n }\n ) {\n userByStudentId {\n full_name\n }\n }\n }\n }\n\n profile_teacher(\n where: {\n _or: [\n { user_code: { _eq: $searchValue } }\n { user: { email: { _eq: $searchValue } } }\n { user: { full_name: { _eq: $searchValue } } }\n { user: { phone_number: { _eq: $searchValue } } }\n ]\n deleted_at: { _is_null: true }\n user: { school_id: { _eq: $school_id }, deleted_at: { _is_null: true } }\n }\n ) {\n user {\n id\n full_name\n email\n phone_number\n user_roles(where: { deleted_at: { _is_null: true }, user: { deleted_at: { _is_null: true } } }) {\n role {\n name\n role_code\n }\n }\n relationship_users(\n where: {\n deleted_at: { _is_null: true }\n user: { deleted_at: { _is_null: true } }\n userByStudentId: { deleted_at: { _is_null: true } }\n }\n ) {\n userByStudentId {\n full_name\n }\n }\n }\n }\n }\n"])));
|
|
14
14
|
exports.queryGetProfile = (0, client_1.gql)(templateObject_8 || (templateObject_8 = tslib_1.__makeTemplateObject(["\n query QueryGetProfile($user_id: Int!, $school_id: Int!) {\n profile_staff(\n where: {\n staff_id: { _eq: $user_id }\n deleted_at: { _is_null: true }\n user: { deleted_at: { _is_null: true }, school_id: { _eq: $school_id } }\n }\n ) {\n is_quit_job\n }\n profile_teacher(\n where: {\n teacher_id: { _eq: $user_id }\n deleted_at: { _is_null: true }\n user: { school_id: { _eq: $school_id }, deleted_at: { _is_null: true } }\n }\n ) {\n is_quit_job\n }\n }\n"], ["\n query QueryGetProfile($user_id: Int!, $school_id: Int!) {\n profile_staff(\n where: {\n staff_id: { _eq: $user_id }\n deleted_at: { _is_null: true }\n user: { deleted_at: { _is_null: true }, school_id: { _eq: $school_id } }\n }\n ) {\n is_quit_job\n }\n profile_teacher(\n where: {\n teacher_id: { _eq: $user_id }\n deleted_at: { _is_null: true }\n user: { school_id: { _eq: $school_id }, deleted_at: { _is_null: true } }\n }\n ) {\n is_quit_job\n }\n }\n"])));
|
|
15
|
-
|
|
16
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
|
|
15
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
|
|
17
16
|
//# sourceMappingURL=gql.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gql.js","sourceRoot":"","sources":["../../../src/query/gql.ts"],"names":[],"mappings":";;;;AAAA,yCAAoC;AACpC,gDAAsD;AAEzC,QAAA,UAAU,OAAG,YAAG,ynBAAA,0eAcoD,EAAiB,iEAKjG,KALgF,6BAAiB,EAKjG;AAEY,QAAA,eAAe,OAAG,YAAG,oMAAA,wHAOjC,KAAA;AACY,QAAA,0BAA0B,OAAG,YAAG,y1BAAA,6wBAgC5C,KAAA;AACY,QAAA,eAAe,OAAG,YAAG,s2BAAA,0xBAmCjC,KAAA;AACY,QAAA,0BAA0B,OAAG,YAAG,mtBAAA,uoBA4B5C,KAAA;AAEY,QAAA,8BAA8B,OAAG,YAAG,u1EAAA,2wEAsFhD,KAAA;AAEY,QAAA,iBAAiB,OAAG,YAAG,msFAAA,unFAoGnC,KAAA;AAEY,QAAA,eAAe,OAAG,YAAG,onBAAA,wiBAqBjC,KAAA
|
|
1
|
+
{"version":3,"file":"gql.js","sourceRoot":"","sources":["../../../src/query/gql.ts"],"names":[],"mappings":";;;;AAAA,yCAAoC;AACpC,gDAAsD;AAEzC,QAAA,UAAU,OAAG,YAAG,ynBAAA,0eAcoD,EAAiB,iEAKjG,KALgF,6BAAiB,EAKjG;AAEY,QAAA,eAAe,OAAG,YAAG,oMAAA,wHAOjC,KAAA;AACY,QAAA,0BAA0B,OAAG,YAAG,y1BAAA,6wBAgC5C,KAAA;AACY,QAAA,eAAe,OAAG,YAAG,s2BAAA,0xBAmCjC,KAAA;AACY,QAAA,0BAA0B,OAAG,YAAG,mtBAAA,uoBA4B5C,KAAA;AAEY,QAAA,8BAA8B,OAAG,YAAG,u1EAAA,2wEAsFhD,KAAA;AAEY,QAAA,iBAAiB,OAAG,YAAG,msFAAA,unFAoGnC,KAAA;AAEY,QAAA,eAAe,OAAG,YAAG,onBAAA,wiBAqBjC,KAAA"}
|
|
@@ -7,11 +7,10 @@ import { PHXButton } from '../Button';
|
|
|
7
7
|
import { PHXBanner } from '../Banner';
|
|
8
8
|
import { AUTH_TOKEN, isLoggedCookie } from '../../utils/constants';
|
|
9
9
|
import { getEnv } from '../../read-env-config';
|
|
10
|
-
import { GET_SCHOOL
|
|
10
|
+
import { GET_SCHOOL } from '../../query/gql';
|
|
11
11
|
import saveCookiesClient from '../Func/saveCookiesClient';
|
|
12
12
|
import { PHXCheckbox } from '../Checkbox';
|
|
13
13
|
import LoginStyle from './login-style';
|
|
14
|
-
import PHXClientQuery from '../Func/clientQueryV2';
|
|
15
14
|
import PHXFuncGetLoggedInfo from '../Func/getLoginInfo';
|
|
16
15
|
import Cookies from 'js-cookie';
|
|
17
16
|
export var PHXLogin = function (props) {
|
|
@@ -23,29 +22,12 @@ export var PHXLogin = function (props) {
|
|
|
23
22
|
var schoolLogo = getEnv('NEXT_PUBLIC_ENV_LOGIN_LOGO', process.env.NEXT_PUBLIC_ENV_LOGIN_LOGO);
|
|
24
23
|
var _d = useForm(), handleSubmit = _d.handleSubmit, register = _d.register, errors = _d.formState.errors;
|
|
25
24
|
var uri = getEnv('NEXT_PUBLIC_API_GATEWAY', process.env.NEXT_PUBLIC_API_GATEWAY);
|
|
26
|
-
var GetProfile = useLazyQuery(queryProfile, {
|
|
27
|
-
fetchPolicy: 'network-only',
|
|
28
|
-
notifyOnNetworkStatusChange: true
|
|
29
|
-
})[0];
|
|
30
25
|
var getTokenInfo = function (email, password) { return __awaiter(void 0, void 0, void 0, function () {
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
variables: {
|
|
37
|
-
email: email
|
|
38
|
-
}
|
|
39
|
-
})];
|
|
40
|
-
case 1:
|
|
41
|
-
authenProfile = _g.sent();
|
|
42
|
-
authenTeacher = (_c = (_b = (_a = authenProfile.data) === null || _a === void 0 ? void 0 : _a.profile_teacher) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.is_quit_job;
|
|
43
|
-
authenParent = (_f = (_e = (_d = authenProfile.data) === null || _d === void 0 ? void 0 : _d.profile_staff) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.is_quit_job;
|
|
44
|
-
if (authenTeacher || authenParent)
|
|
45
|
-
return [2 /*return*/];
|
|
46
|
-
_g.label = 2;
|
|
47
|
-
case 2:
|
|
48
|
-
_g.trys.push([2, 6, , 7]);
|
|
26
|
+
var tokenInfoRes, error_1;
|
|
27
|
+
return __generator(this, function (_a) {
|
|
28
|
+
switch (_a.label) {
|
|
29
|
+
case 0:
|
|
30
|
+
_a.trys.push([0, 4, , 5]);
|
|
49
31
|
return [4 /*yield*/, fetch("".concat(uri, "/authen/login"), {
|
|
50
32
|
headers: {
|
|
51
33
|
'Content-Type': 'application/json'
|
|
@@ -56,17 +38,17 @@ export var PHXLogin = function (props) {
|
|
|
56
38
|
password: password
|
|
57
39
|
})
|
|
58
40
|
})];
|
|
59
|
-
case
|
|
60
|
-
tokenInfoRes =
|
|
61
|
-
if (!tokenInfoRes) return [3 /*break*/,
|
|
41
|
+
case 1:
|
|
42
|
+
tokenInfoRes = _a.sent();
|
|
43
|
+
if (!tokenInfoRes) return [3 /*break*/, 3];
|
|
62
44
|
return [4 /*yield*/, tokenInfoRes.json()];
|
|
63
|
-
case
|
|
64
|
-
case
|
|
65
|
-
case
|
|
66
|
-
error_1 =
|
|
45
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
46
|
+
case 3: return [3 /*break*/, 5];
|
|
47
|
+
case 4:
|
|
48
|
+
error_1 = _a.sent();
|
|
67
49
|
console.error(error_1);
|
|
68
50
|
return [2 /*return*/, null];
|
|
69
|
-
case
|
|
51
|
+
case 5: return [2 /*return*/];
|
|
70
52
|
}
|
|
71
53
|
});
|
|
72
54
|
}); };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Login.js","sourceRoot":"","sources":["../../../../src/components/Login/Login.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAg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SAAS,EAAC,+CAA+C;oBAC5D,6BACE,SAAS,EAAC,6CAA6C,EACvD,GAAG,EACD,MAAM,aAAN,MAAM,cAAN,MAAM,GACN,wIAAwI,EAE1I,GAAG,EAAC,QAAQ,GACZ,CACE,CACF,CACD,CACN,CACJ,CAAA;AACH,CAAC,CAAA;AAED,eAAe,QAAQ,CAAA"}
|
package/dist/esm/query/gql.d.ts
CHANGED
|
@@ -6,4 +6,3 @@ export declare const getActiveAndNextSchoolYear: import("@apollo/client").Docume
|
|
|
6
6
|
export declare const getTuitionDebtRecordByUserCode: import("@apollo/client").DocumentNode;
|
|
7
7
|
export declare const querySearchGlobal: import("@apollo/client").DocumentNode;
|
|
8
8
|
export declare const queryGetProfile: import("@apollo/client").DocumentNode;
|
|
9
|
-
export declare const queryProfile: import("@apollo/client").DocumentNode;
|
package/dist/esm/query/gql.js
CHANGED
|
@@ -9,6 +9,5 @@ export var getActiveAndNextSchoolYear = gql(templateObject_5 || (templateObject_
|
|
|
9
9
|
export var getTuitionDebtRecordByUserCode = gql(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n query GetTuitionDebtRecordByUserCode($user_code: String, $school_year_id: Int, $school_id: Int) {\n tuition_fee_debt_record(\n order_by: { school_term_id: asc }\n where: {\n deleted_at: { _is_null: true }\n school_id: { _eq: $school_id }\n user_code: { _eq: $user_code }\n school_term: { school_year_id: { _eq: $school_year_id } }\n }\n ) {\n total_promotion_service\n total_payment\n total_promotion_tuition_policy\n total_promotion_tuition_scholar_ship\n total_promotion_tuition_seniority\n total_promotion_early\n total_promotion_admission\n total_required_service\n total_not_required_service\n total_tuition\n last_period_debt_balance\n last_period_credit_balance\n status\n last_credit_balance\n last_debt_balance\n total_refund\n total_adjustment_refund\n total_adjustment_additional\n id\n status\n school_term {\n school_year {\n name\n code\n }\n name\n code\n coefficient\n id\n }\n profile_student {\n tuition_notice_delivered_emails(order_by: { created_at: desc }) {\n link_pdf_cdn\n tuition_notice_campaign {\n school_term_id\n }\n }\n }\n user_code\n }\n tuition_fee_debt_record_by_month(\n order_by: { month_id: asc }\n where: {\n deleted_at: { _is_null: true }\n school_id: { _eq: $school_id }\n user_code: { _eq: $user_code }\n school_month: { school_term: { school_year_id: { _eq: $school_year_id } } }\n }\n ) {\n total_promotion_service\n total_payment\n total_promotion_tuition_policy\n total_promotion_tuition_scholar_ship\n total_promotion_tuition_seniority\n total_promotion_early\n total_promotion_admission\n total_required_service\n total_not_required_service\n total_tuition\n last_period_debt_balance\n last_period_credit_balance\n status\n last_credit_balance\n last_debt_balance\n total_refund\n total_adjustment_refund\n total_adjustment_additional\n id\n status\n school_month {\n name\n }\n user_code\n }\n }\n"], ["\n query GetTuitionDebtRecordByUserCode($user_code: String, $school_year_id: Int, $school_id: Int) {\n tuition_fee_debt_record(\n order_by: { school_term_id: asc }\n where: {\n deleted_at: { _is_null: true }\n school_id: { _eq: $school_id }\n user_code: { _eq: $user_code }\n school_term: { school_year_id: { _eq: $school_year_id } }\n }\n ) {\n total_promotion_service\n total_payment\n total_promotion_tuition_policy\n total_promotion_tuition_scholar_ship\n total_promotion_tuition_seniority\n total_promotion_early\n total_promotion_admission\n total_required_service\n total_not_required_service\n total_tuition\n last_period_debt_balance\n last_period_credit_balance\n status\n last_credit_balance\n last_debt_balance\n total_refund\n total_adjustment_refund\n total_adjustment_additional\n id\n status\n school_term {\n school_year {\n name\n code\n }\n name\n code\n coefficient\n id\n }\n profile_student {\n tuition_notice_delivered_emails(order_by: { created_at: desc }) {\n link_pdf_cdn\n tuition_notice_campaign {\n school_term_id\n }\n }\n }\n user_code\n }\n tuition_fee_debt_record_by_month(\n order_by: { month_id: asc }\n where: {\n deleted_at: { _is_null: true }\n school_id: { _eq: $school_id }\n user_code: { _eq: $user_code }\n school_month: { school_term: { school_year_id: { _eq: $school_year_id } } }\n }\n ) {\n total_promotion_service\n total_payment\n total_promotion_tuition_policy\n total_promotion_tuition_scholar_ship\n total_promotion_tuition_seniority\n total_promotion_early\n total_promotion_admission\n total_required_service\n total_not_required_service\n total_tuition\n last_period_debt_balance\n last_period_credit_balance\n status\n last_credit_balance\n last_debt_balance\n total_refund\n total_adjustment_refund\n total_adjustment_additional\n id\n status\n school_month {\n name\n }\n user_code\n }\n }\n"])));
|
|
10
10
|
export var querySearchGlobal = gql(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n query QuerySearchGlobal($school_id: Int, $searchValue: String) {\n profile_student(\n where: {\n _or: [\n { user_code: { _eq: $searchValue } }\n { user: { school_id: { _eq: $school_id }, deleted_at: { _is_null: true }, full_name: { _eq: $searchValue } } }\n ]\n }\n ) {\n user_code\n user {\n id\n user_roles(where: { deleted_at: { _is_null: true }, user: { deleted_at: { _is_null: true } } }) {\n role {\n name\n role_code\n }\n }\n classroom_students {\n classroom {\n name\n }\n }\n id\n full_name\n }\n }\n\n profile_parent(\n where: {\n _or: [\n { user: { email: { _eq: $searchValue } } }\n { user: { full_name: { _eq: $searchValue } } }\n { user: { phone_number: { _eq: $searchValue } } }\n ]\n deleted_at: { _is_null: true }\n user: { school_id: { _eq: $school_id }, deleted_at: { _is_null: true } }\n }\n ) {\n user {\n id\n full_name\n user_roles(where: { deleted_at: { _is_null: true }, user: { deleted_at: { _is_null: true } } }) {\n role {\n name\n role_code\n }\n }\n relationship_users(\n where: {\n deleted_at: { _is_null: true }\n user: { deleted_at: { _is_null: true } }\n userByStudentId: { deleted_at: { _is_null: true } }\n }\n ) {\n userByStudentId {\n full_name\n }\n }\n }\n }\n\n profile_teacher(\n where: {\n _or: [\n { user_code: { _eq: $searchValue } }\n { user: { email: { _eq: $searchValue } } }\n { user: { full_name: { _eq: $searchValue } } }\n { user: { phone_number: { _eq: $searchValue } } }\n ]\n deleted_at: { _is_null: true }\n user: { school_id: { _eq: $school_id }, deleted_at: { _is_null: true } }\n }\n ) {\n user {\n id\n full_name\n email\n phone_number\n user_roles(where: { deleted_at: { _is_null: true }, user: { deleted_at: { _is_null: true } } }) {\n role {\n name\n role_code\n }\n }\n relationship_users(\n where: {\n deleted_at: { _is_null: true }\n user: { deleted_at: { _is_null: true } }\n userByStudentId: { deleted_at: { _is_null: true } }\n }\n ) {\n userByStudentId {\n full_name\n }\n }\n }\n }\n }\n"], ["\n query QuerySearchGlobal($school_id: Int, $searchValue: String) {\n profile_student(\n where: {\n _or: [\n { user_code: { _eq: $searchValue } }\n { user: { school_id: { _eq: $school_id }, deleted_at: { _is_null: true }, full_name: { _eq: $searchValue } } }\n ]\n }\n ) {\n user_code\n user {\n id\n user_roles(where: { deleted_at: { _is_null: true }, user: { deleted_at: { _is_null: true } } }) {\n role {\n name\n role_code\n }\n }\n classroom_students {\n classroom {\n name\n }\n }\n id\n full_name\n }\n }\n\n profile_parent(\n where: {\n _or: [\n { user: { email: { _eq: $searchValue } } }\n { user: { full_name: { _eq: $searchValue } } }\n { user: { phone_number: { _eq: $searchValue } } }\n ]\n deleted_at: { _is_null: true }\n user: { school_id: { _eq: $school_id }, deleted_at: { _is_null: true } }\n }\n ) {\n user {\n id\n full_name\n user_roles(where: { deleted_at: { _is_null: true }, user: { deleted_at: { _is_null: true } } }) {\n role {\n name\n role_code\n }\n }\n relationship_users(\n where: {\n deleted_at: { _is_null: true }\n user: { deleted_at: { _is_null: true } }\n userByStudentId: { deleted_at: { _is_null: true } }\n }\n ) {\n userByStudentId {\n full_name\n }\n }\n }\n }\n\n profile_teacher(\n where: {\n _or: [\n { user_code: { _eq: $searchValue } }\n { user: { email: { _eq: $searchValue } } }\n { user: { full_name: { _eq: $searchValue } } }\n { user: { phone_number: { _eq: $searchValue } } }\n ]\n deleted_at: { _is_null: true }\n user: { school_id: { _eq: $school_id }, deleted_at: { _is_null: true } }\n }\n ) {\n user {\n id\n full_name\n email\n phone_number\n user_roles(where: { deleted_at: { _is_null: true }, user: { deleted_at: { _is_null: true } } }) {\n role {\n name\n role_code\n }\n }\n relationship_users(\n where: {\n deleted_at: { _is_null: true }\n user: { deleted_at: { _is_null: true } }\n userByStudentId: { deleted_at: { _is_null: true } }\n }\n ) {\n userByStudentId {\n full_name\n }\n }\n }\n }\n }\n"])));
|
|
11
11
|
export var queryGetProfile = gql(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n query QueryGetProfile($user_id: Int!, $school_id: Int!) {\n profile_staff(\n where: {\n staff_id: { _eq: $user_id }\n deleted_at: { _is_null: true }\n user: { deleted_at: { _is_null: true }, school_id: { _eq: $school_id } }\n }\n ) {\n is_quit_job\n }\n profile_teacher(\n where: {\n teacher_id: { _eq: $user_id }\n deleted_at: { _is_null: true }\n user: { school_id: { _eq: $school_id }, deleted_at: { _is_null: true } }\n }\n ) {\n is_quit_job\n }\n }\n"], ["\n query QueryGetProfile($user_id: Int!, $school_id: Int!) {\n profile_staff(\n where: {\n staff_id: { _eq: $user_id }\n deleted_at: { _is_null: true }\n user: { deleted_at: { _is_null: true }, school_id: { _eq: $school_id } }\n }\n ) {\n is_quit_job\n }\n profile_teacher(\n where: {\n teacher_id: { _eq: $user_id }\n deleted_at: { _is_null: true }\n user: { school_id: { _eq: $school_id }, deleted_at: { _is_null: true } }\n }\n ) {\n is_quit_job\n }\n }\n"])));
|
|
12
|
-
|
|
13
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
|
|
12
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
|
|
14
13
|
//# sourceMappingURL=gql.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gql.js","sourceRoot":"","sources":["../../../src/query/gql.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAEtD,MAAM,CAAC,IAAM,UAAU,GAAG,GAAG,gnBAAA,0eAcoD,EAAiB,iEAKjG,KALgF,iBAAiB,CAKjG,CAAA;AAED,MAAM,CAAC,IAAM,e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