Skip to content

Commit

Permalink
removed graduation year field
Browse files Browse the repository at this point in the history
  • Loading branch information
valentin-stamate committed Dec 7, 2021
1 parent 42f6d4a commit fd7412b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/app/graphql/queries/queries.gql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type Query {
hello: String
getStudentsData(user: String!, password: String!): String
getStudentsData(user: String!, password: String!): [String]
}
1 change: 0 additions & 1 deletion src/app/graphql/queries/types.gql
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ input StudentForm {
marriageName: String
thesis: String
coordinator: String
graduationYear: String
scholarShip: String
completionDate: String
cnatdcuRank: String
Expand Down
2 changes: 0 additions & 2 deletions src/app/graphql/resolvers/mutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ export const mutations = {
sendForm: async ({form}: any) => {
const studentId = form.studentId;

console.log(form)

const idRegex = new RegExp('([0-9]+[A-Z]+[0-9]+)');

if (!idRegex.test(studentId) && studentId.length < 10) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/graphql/resolvers/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const queries = {
getStudentsData: async ({user, password}: any) => {

if (user === 'adriana.bejinariu' && password === 'u^*&9jy8da-02eic-lwvun4') {
return `http://localhost:8080/${cons.downloadKey}`;
return [`http://localhost:8080/${cons.downloadKey}`];
}

throw new Error("Invalid credentials");
Expand Down
20 changes: 19 additions & 1 deletion src/app/script/util/students_file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export const columnOrderWithName = [
['marriageName', 'Nume de Casatorie'],
['thesis', 'Teza de Doctorat'],
['coordinator', 'Coordonator'],
['graduationYear', 'Anul Absolvirii'],
['scholarShip', 'Bursa'],
['completionDate', 'Data Completarii'],
['cnatdcuRank', 'Rank CNATDCU'],
Expand Down Expand Up @@ -85,3 +84,22 @@ export const columnOrderMap = new Map();
for (let i in columnOrderWithName) {
columnOrderMap.set(columnOrderWithName[i][0], i);
}

// TODO Second type of student document

// export const columnOrderWithNameSecond = [
// ['studentId', 'Numar Matricol'],
// ['doctoralThesisType', 'Tip Formular'],
// ['name', 'Nume'],
//
// ];
//
// export const columnOrderSecond: string[] = [];
// for (const column of columnOrderWithNameSecond) {
// columnOrderSecond.push(column[0]);
// }
//
// export const columnOrderMapSecond = new Map();
// for (let i in columnOrderWithNameSecond) {
// columnOrderMapSecond.set(columnOrderWithNameSecond[i][0], i);
// }

0 comments on commit fd7412b

Please sign in to comment.