Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed unnecessary console #63

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export const saveContactAction = async (ctx: Koa.Context) => {
if (contacts[index].contactType === 'clientcontact') {
isClientContactExist = true;
}
console.log(contacts[index].id);
if (!contacts[index].id || contacts[index].id === undefined) {
contacts[index].id = undefined;
contacts[index].contactType = 'clientcontact';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export const saveFinanceCodes = async (ctx: Koa.Context) => {
export const updateFinanceCode = async (ctx: Koa.Context) => {
try {
const body = ctx.request.body;
console.log(body);
ctx.body = await updatFinanceCodes(body.FinanceCodes.id, body.FinanceCodes);
} catch (err) {
ctx.throw(err.message);
Expand Down
2 changes: 0 additions & 2 deletions api/src/app/routes/client/controllers/ministry.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ export const getMinistryById = async (ctx: Koa.Context) => {
export const updateMinistryActionById = async (ctx: Koa.Context) => {
try {
const ministry = ctx.request.body;
console.log('updateMinistryAction called', { ministry });
const ret = await updateMinistry(ministry);
console.log('updateMinistryAction done', {ret})
ctx.body = 'success';
} catch (err) {
ctx.throw(err.message)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export const saveProcurementLog = async (ctx: Koa.Context) => {
export const updateProcurementLog = async (ctx: Koa.Context) => {
try {
const body = ctx.request.body;
console.log(body);
ctx.body = await updateProcLog(body.procurementlog.id, body.procurementlog);
} catch (err) {
ctx.throw(err.message);
Expand Down
10 changes: 0 additions & 10 deletions api/src/app/routes/client/controllers/projectNote.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,6 @@ export const saveProjectNotes = async (ctx: Koa.Context) => {
}
};

// export const updateProcurementLog = async (ctx: Koa.Context) => {
// try {
// const body = ctx.request.body;
// console.log(body);
// ctx.body = await updateProcLog(body.procurementlog.id, body.procurementlog);
// } catch (err) {
// ctx.throw(err.message);
// }
// };

export const getAllProjectNotes = async (ctx: Koa.Context) => {
try {
// TODO - If user is NOT admin, return only the sheets by user id?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export const saveRfxPhase = async (ctx: Koa.Context) => {
export const rfxPhaseUpdate = async (ctx: Koa.Context) => {
try {
const body = ctx.request.body;
console.log(body);
ctx.body = await updateRfxPhase(body.RfxPhase.id, body.RfxPhase);
} catch (err) {
ctx.throw(err.message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export const saveRfxType = async (ctx: Koa.Context) => {
export const rfxTypeUpdate = async (ctx: Koa.Context) => {
try {
const body = ctx.request.body;
console.log(body);
ctx.body = await updateRfxType(body.RfxType.id, body.RfxType);
} catch (err) {
ctx.throw(err.message);
Expand Down
10 changes: 0 additions & 10 deletions api/src/app/routes/client/controllers/timesheet.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export const timesheetEntries = async (ctx: Koa.Context) => {
ctx.throw('no data Found');
return;
}
console.log(model);
ctx.body = await retrieveTimesheetByUserAndDate(model);
} catch (err) {
ctx.throw(err.message);
Expand All @@ -72,7 +71,6 @@ export const timeEntryByUser = async (ctx: Koa.Context) => {
ctx.throw('no data Found');
return;
}
console.log(model);
ctx.body = await retrieveForLightTimesheetByUser(model);
} catch (err) {
ctx.throw(err.message);
Expand Down Expand Up @@ -160,8 +158,6 @@ export const createBatchTimesheet = async (ctx: Koa.Context) => {
}
let timesheet = await retrieveForLightTimesheet(model);

console.log('createLightTimesheet, does timesheet exist?', { timesheet });

let timesheetId: string;
if (timesheet) {
timesheetId = timesheet.id;
Expand All @@ -171,9 +167,6 @@ export const createBatchTimesheet = async (ctx: Koa.Context) => {
model.createdUserId = auth.userId;

timesheet = await createTimesheet(model);
console.log('createLightTimesheet, CREATED new timesheet', {
timesheet
});
timesheetId = timesheet.id;
model.id = timesheetId;
}
Expand Down Expand Up @@ -263,8 +256,6 @@ export const createLightTimesheet = async (ctx: Koa.Context) => {

let timesheet = await retrieveForLightTimesheet(model);

console.log('createLightTimesheet, does timesheet exist?', { timesheet });

let timesheetId: string;
if (timesheet) {
timesheetId = timesheet.id;
Expand All @@ -274,7 +265,6 @@ export const createLightTimesheet = async (ctx: Koa.Context) => {
model.createdUserId = auth.userId;

timesheet = await createTimesheet(model);
console.log('createLightTimesheet, CREATED new timesheet', { timesheet });
timesheetId = timesheet.id;
model.id = timesheetId;
}
Expand Down
2 changes: 0 additions & 2 deletions api/src/app/services/client/intake.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ export const updateIntake = async (id: string, fields: any) => {
const updatedIntake = await repo.merge(intake, fields);
updatedIntake.dateModified = new Date();

console.log('\n\nupdateIntake in service', fields);

await repo.save(updatedIntake);
return updatedIntake;
};
Expand Down
1 change: 0 additions & 1 deletion api/src/app/services/client/mou.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,5 @@ export const assignProjectToMOU = async (obj) => {
const id_todo = '1';
// const proj = await retrieveProjectById(id_todo)
// projs.mouID = '999'
console.log('assignProjectToMOU, TODO TEST ME!');
const status = await updateProject(id_todo, { mouID: 999 });
};
1 change: 0 additions & 1 deletion api/src/app/services/client/timesheet.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ export const retrieveForLightTimesheet = async (model) => {
};
export const retrieveForLightTimesheetByUser = async (model) => {
const repo = timesheetRepo();
console.log('model', model);
const res = await repo
.createQueryBuilder('t')
.innerJoinAndSelect('t.projectRfx', 'pr')
Expand Down
4 changes: 0 additions & 4 deletions api/src/app/services/client/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export const retrieveUserByReferenceId = async (id: string) => {
};

export const retrieveUsersNameAndIdByRole = async (roles: string[]) => {
// console.log('retrieveUsersNameAndIdByRole start - ', roles)

const repo = userRepo();
const users = await repo
Expand All @@ -58,9 +57,6 @@ export const retrieveUsersNameAndIdByRole = async (roles: string[]) => {
.orderBy('c.fullName', 'ASC')
.getMany();

// console.log('retrieveUsersNameAndIdByRole B -', { repo, users })
// console.log('retrieveUsersNameAndIdByRole B -')

const kcAdminToken = await retrieveKeycloakAdminToken();
// ARC - ERROR OCCURS ABOVE
// console.log('retrieveUsersNameAndIdByRole C - after adminToken', { kcAdminToken })
Expand Down
8 changes: 0 additions & 8 deletions api/src/app/services/common/auth-verification.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,9 @@ export const validateToken = async (
} else {
// there is no token, don't process request further
ctx.status = HttpStatus.UNAUTHORIZED;
console.log('ARC Unauthorized 2 - changed');
}
} catch (error) {
ctx.status = HttpStatus.UNAUTHORIZED;
console.log('ARC Unauthorized 3');
throw error;
}
};
Expand Down Expand Up @@ -162,15 +160,10 @@ export const retrieveKeycloakUsersByRole = async (
const verifyAndCreateOrUpdateUser = async (authData: IAuth, data: any) => {
const user = await retrieveUserByReferenceId(data.sub);
if (!user) {
console.log(
'ARC - User does not exist, creating contact with nam: ',
authData.fullName
);
const contact: any = await createContact(<IContact>{
fullName: authData.fullName,
contactType: 'user',
});
console.log('ARC - Created contact. ID: ', contact.id);
const createdUser = await createUser(<IUser>{
referenceId: authData.referenceId,
role: authData.role[0],
Expand All @@ -179,7 +172,6 @@ const verifyAndCreateOrUpdateUser = async (authData: IAuth, data: any) => {
},
});
authData.userId = createdUser.id;
console.log('ARC - Created user ID:', createdUser.id);
} else {
if (user.role?user.role:'' !== authData.role[0]) {
await updateUser(user.id, { role: authData.role[0] });
Expand Down
1 change: 0 additions & 1 deletion web/src/components/error/Unauthorized.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export default {
setTimeout(() => {
clearInterval(timer);
// this.$router.push('/logout');
console.log('LOGOUT TODO');
}, 5000);
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,6 @@ export default {
},
computed: {
intakeRequests() {
// console.log('intakeRequests', this.$store.state.intakeRequests);

return this.$store.state.intakeRequests;
},
userList() {
Expand Down Expand Up @@ -250,7 +248,7 @@ export default {
this.dialog = true;
},
async approveRequest(id) {
const selectedCategory = await this.$refs.selectCategory.open();
const selectedCategory = await this.$refs.selectCategory.open();
if (selectedCategory) {
this.$store.dispatch('approveIntakeRequest', { id, categoryId: selectedCategory }).then(() => {
this.$store.dispatch('fetchIntakeRequests');
Expand Down Expand Up @@ -405,7 +403,6 @@ export default {
const project = this.mouProject;
project.mou = { id: mouID, name: this.mou };
const projResponse = await this.$store.dispatch('updateIntakeRequest', project);
// console.log('assignMOU projResponse', {projResponse});

this.fetchData();
this.mouDialog = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ export default {
},
methods: {
reset() {
console.log('hi its working');
},
disableWeekPicker(flag = false) {
this.disabledatepicker = flag;
Expand Down
7 changes: 3 additions & 4 deletions web/src/components/timeMachine/timesheets/AddTimeRecord.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
content-class="add-time-record"
v-model="dialog"
@input="closeDialog(false)"
>
>
<v-form ref="AddimeRecords" v-model="valid" lazy-validation>
<spinner ref="spinner"></spinner>
<v-card>
Expand Down Expand Up @@ -330,11 +330,10 @@ export default {
return sum;
},
selectedProject() {
console.log("selectedProject");
if (this.form && this.form.mou && this.form.project) {
const selectedProject = this.userMouProjects.filter(item => item.id === this.form.project);
if (selectedProject[0]) {
const project = selectedProject[0];
const project = selectedProject[0];
return{
mouAmount: project.mouAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','),
totalBilledAmount: project.totalAmountBilled.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','),
Expand Down Expand Up @@ -409,7 +408,7 @@ export default {
if (this.$refs.spinner) {
this.$refs.spinner.close();
}

return vm.userMouProjects;
},
onChangeMou(editMode) {
Expand Down
11 changes: 1 addition & 10 deletions web/src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import HashTable from "@/utils/HashTable";
import RFxDto from "@/domain/models/RFx.dto";

const API_URI = process.env.VUE_APP_API_URI || "http://localhost:3000";
console.log("API URL:", { API_URI });

Vue.use(Vuex);

Expand Down Expand Up @@ -252,7 +251,6 @@ const store = new Vuex.Store({
throw new Error("Not implemented!");
},
addMinistry(state, data) {
console.log("TODO - NOT SURE IF COMPLETE - addMinistry MUTATION called", { state, data });
// state.ministries = data;
// throw new Error('Not implemented');
},
Expand Down Expand Up @@ -301,7 +299,6 @@ const store = new Vuex.Store({
throw new Error("Not implemented!");
},
createMOU(state, data) {
console.log("createMOU mutation", data);
// state.mouList = data;
state.mouList.push(data);
},
Expand Down Expand Up @@ -378,7 +375,6 @@ const store = new Vuex.Store({
// Project RFx
fetchProjectRFxData(state, data) {
// if it's an empty array, need to add blank rfX type
console.log("fetchProjectRFxData", { data });
if (data && data.length === 0) {
data.push(new RFxDto());
}
Expand Down Expand Up @@ -484,7 +480,7 @@ const store = new Vuex.Store({
throw new Error("Not implemented!");
},
archiveProject(state, data) {
console.log("archiveProject response", data);

}
},
/**
Expand Down Expand Up @@ -536,7 +532,6 @@ const store = new Vuex.Store({
fetchAllFinanceCodes(ctx) {
$http.get(`${API_URI}/financecode/all`).then(res => {
const content = res.data;
console.log("fincodes:", content);
ctx.commit("fetchAllFinanceCodes", content);
});
},
Expand All @@ -556,7 +551,6 @@ const store = new Vuex.Store({
const api = await $http
.patch(`${API_URI}/ministry/${req.id}/update`, req)
.then(res => {
console.log("updateMinistires RESPONSE", { res });
return Promise.resolve(res.data);
})
.catch(err => Promise.reject(err));
Expand Down Expand Up @@ -819,7 +813,6 @@ const store = new Vuex.Store({
.post(`${API_URI}/MOU`, body)
.then(res => {
const content = res.data;
console.log("createMOU called with body", body);
ctx.commit("createMOU", content);
return Promise.resolve(content);
})
Expand Down Expand Up @@ -877,7 +870,6 @@ const store = new Vuex.Store({
},

async updateProctLog(ctx, req) {
console.log(req);
const api = $http
.patch(`${API_URI}/procurement/${req.id}`, req)
.then(res => {
Expand All @@ -889,7 +881,6 @@ const store = new Vuex.Store({
return Promise.resolve(api);
},
async updateFinanceCodes(ctx, req) {
console.log("reqq:", req);
const api = $http
.patch(`${API_URI}/financecode/${req.id}`, req)
.then(res => {
Expand Down