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

Frontend Release to Main [3.60] #2352

Merged
merged 37 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b198a09
added test cases for BMLogin component
Shiwani99 Apr 17, 2024
39b7fb1
added 7 more test cases
Shiwani99 Apr 25, 2024
4d3cbcf
Created Purchase Equipment Page
pshereen Apr 29, 2024
508448c
Delete package-lock.json
pshereen Apr 29, 2024
a7e6ff2
Updated Equipment Purchase form
pshereen May 8, 2024
3c7f149
Removed console log
pshereen May 8, 2024
5ba3748
Bump tinymce from 5.10.8 to 7.0.0
dependabot[bot] May 9, 2024
2f7399b
Removed Old EquipmentPurchase form
pshereen May 9, 2024
d0c906c
removed unused imports and added assertions to waitFor
Shiwani99 May 22, 2024
a535046
fix for searchbreak after savingteamcode
Ramaruva May 29, 2024
3145661
Merge branch 'development' of https://github.com/OneCommunityGlobal/H…
Ramaruva May 30, 2024
54ade33
changed the regex code for teamcode validation to include num
Ramaruva May 31, 2024
8f3e375
Merge branch 'development' of https://github.com/OneCommunityGlobal/H…
Ramaruva Jun 3, 2024
fbc60ca
feat: click on profile icon on dashboard will open in new tab instead…
jennZhang93 Jun 7, 2024
efb352c
fix: remove Admin component and related files
wang9hu Jun 7, 2024
d440947
fix: minor bugs fix and code formatting
wang9hu Jun 7, 2024
5766074
change!: convert Project component from class to function component, …
wang9hu Jun 7, 2024
54e862e
fix: remove wbs request to backend, instead Timelog and TimeEntryForm…
wang9hu Jun 7, 2024
e49f5ed
Merge branch 'development' of https://github.com/OneCommunityGlobal/H…
Ramaruva Jun 7, 2024
2987868
modified regex for teamcode
Ramaruva Jun 7, 2024
ff33fa4
feat: Create function adjustTextareaHeight and add some style propert…
nathcarnevalli Jun 7, 2024
9f75551
fix: remove unused wbs_user url
wang9hu Jun 7, 2024
ff6b376
fix: fix lint error
wang9hu Jun 7, 2024
b832bc7
fix: update TimeEntry so that it uses data from backend to show proje…
wang9hu Jun 8, 2024
abdd460
fix: fix test error
wang9hu Jun 8, 2024
f92f18e
Merge pull request #2334 from OneCommunityGlobal/xiaow_project_refact…
one-community Jun 8, 2024
d482eb5
Merge pull request #2333 from OneCommunityGlobal/Nathalia_make_blue_s…
one-community Jun 8, 2024
6d32a4c
Merge pull request #2144 from OneCommunityGlobal/dependabot/npm_and_y…
EvianTan Jun 9, 2024
f9b623a
Merge pull request #2279 from OneCommunityGlobal/shiwani_BMLogin_Unit…
one-community Jun 9, 2024
855ece2
Merge pull request #2301 from OneCommunityGlobal/Ramakrishna_Fix_Repo…
one-community Jun 9, 2024
830e1fd
fix: allowed open in current tab if clicked directly
jennZhang93 Jun 9, 2024
0ac9352
Added package.json
pshereen Jun 10, 2024
1d2dec0
Update invTypeActions.js
pshereen Jun 10, 2024
950d7e4
Merge pull request #2341 from OneCommunityGlobal/Youyou_click_profile…
one-community Jun 11, 2024
c45cf9f
merge: fixed merge conflicts
Abi-Liu Jun 11, 2024
42d1575
Merge pull request #2251 from OneCommunityGlobal/Shereen_Purchase_Equ…
one-community Jun 12, 2024
3499ec4
Merge pull request #2330 from OneCommunityGlobal/Ramakrishna_ChangeSe…
one-community Jun 13, 2024
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
30 changes: 10 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"redux-concatenate-reducers": "^1.0.0",
"redux-persist": "^5.10.0",
"redux-thunk": "^2.3.0",
"tinymce": "^5.10.9",
"tinymce": "^7.0.0",
"uuid": "^9.0.1"
},
"scripts": {
Expand Down
31 changes: 30 additions & 1 deletion src/actions/bmdashboard/equipmentActions.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from "axios";
import { ENDPOINTS } from "utils/URL";
import GET_EQUIPMENT_BY_ID from 'constants/bmdashboard/equipmentConstants';
import GET_EQUIPMENT_BY_ID,{SET_EQUIPMENTS}from 'constants/bmdashboard/equipmentConstants';
import { GET_ERRORS } from 'constants/errors';

export const fetchEquipmentById = (equipmentId) => {
Expand All @@ -16,6 +16,25 @@ export const fetchEquipmentById = (equipmentId) => {
}
}

export const fetchAllEQUIPMENTS = () => {
return async dispatch => {
axios.get(ENDPOINTS.BM_EQUIPMENTS)
.then(res => {
dispatch(setEquipments(res.data))
})
.catch(err => {
dispatch(setErrors(err))
})
}
}

export const setEquipments = payload => {
return {
type: SET_EQUIPMENTS,
payload
}
}

export const addEquipmentType = async (body) => {
return axios.post(`${ENDPOINTS.BM_INVTYPE_ROOT}/equipment`, body)
.then(res => res)
Expand All @@ -38,4 +57,14 @@ export const setErrors = payload => {
type: GET_ERRORS,
payload
}
}

export const purchaseEquipment = async (body) => {
return axios.post(ENDPOINTS.BM_EQUIPMENT_PURCHASE, body)
.then(res => res)
.catch((err) => {
if (err.response) return err.response
if (err.request) return err.request
return err.message
})
}
23 changes: 21 additions & 2 deletions src/actions/bmdashboard/invTypeActions.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import axios from 'axios';
import { ENDPOINTS } from "utils/URL";
import GET_MATERIAL_TYPES, { POST_BUILDING_MATERIAL_INVENTORY_TYPE, POST_ERROR_BUILDING_MATERIAL_INVENTORY_TYPE, RESET_POST_BUILDING_MATERIAL_INVENTORY_TYPE, GET_INV_BY_TYPE, GET_TOOL_TYPES ,GET_CONSUMABLE_TYPES } from "constants/bmdashboard/inventoryTypeConstants";
import GET_MATERIAL_TYPES, { POST_BUILDING_MATERIAL_INVENTORY_TYPE, POST_ERROR_BUILDING_MATERIAL_INVENTORY_TYPE, RESET_POST_BUILDING_MATERIAL_INVENTORY_TYPE, GET_INV_BY_TYPE, GET_TOOL_TYPES ,GET_CONSUMABLE_TYPES, GET_EQUIPMENT_TYPES, GET_REUSABLE_TYPES } from "constants/bmdashboard/inventoryTypeConstants";
import { POST_TOOLS_LOG, POST_ERROR_TOOLS_LOG, RESET_POST_TOOLS_LOG } from 'constants/bmdashboard/toolsConstants';

import { GET_ERRORS } from "constants/errors";

export const fetchMaterialTypes = () => {
Expand All @@ -17,7 +16,20 @@ export const fetchMaterialTypes = () => {
}
}

export const fetchEquipmentTypes = () => {
return async dispatch => {
axios.get(ENDPOINTS.BM_EQUIPMENT_TYPES)
.then(res => {
dispatch(setEquipmentTypes(res.data))
})
.catch(err => {
dispatch(setErrors(err))
})
}
}

export const fetchReusableTypes = () => {
console.log("fetchReusableTypes");
return async dispatch => {
axios.get(ENDPOINTS.BM_REUSABLE_TYPES)
.then(res => {
Expand Down Expand Up @@ -157,6 +169,13 @@ export const setMaterialTypes = payload => {
}
}

export const setEquipmentTypes = payload => {
return {
type: GET_EQUIPMENT_TYPES,
payload
}
}

export const setReusableTypes = payload => {
return {
type: GET_REUSABLE_TYPES,
Expand Down
Loading
Loading