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

Production patch release #339

Merged
merged 89 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
8deb6df
Rename all instances of Dashboard to Roadmap
IvyMMutiso Aug 10, 2023
d74c8e4
Add action to navigate to product roadmap from products listing page
IvyMMutiso Aug 12, 2023
208a010
Merge pull request #232 from buildly-release-management/naming
odenypeter Aug 21, 2023
cf8fd2c
Add options from the Download PDF button: Download or Send
IvyMMutiso Aug 28, 2023
e17021d
Merge pull request #234 from buildly-release-management/download-send…
odenypeter Aug 28, 2023
e6a455c
Dev deployment (#267)
patelradhika Feb 13, 2024
265cb20
initial landing page changes
patelradhika Feb 15, 2024
99fc622
fix landing page url
patelradhika Feb 16, 2024
f721180
Merge pull request #269 from buildly-release-management/feat/new-land…
odenypeter Feb 16, 2024
ab917b6
Bump patch version
patelradhika Feb 16, 2024
dc990b5
Merge branch 'prod' into master
patelradhika Feb 16, 2024
417ec3d
User registration from invite link
IvyMMutiso Feb 26, 2024
57d2641
Merge pull request #271 from buildly-release-management/user-registra…
odenypeter Feb 26, 2024
f1b4d96
fix github action for artifact registry
patelradhika Apr 16, 2024
7f9156e
Fix issues (#274)
TanmayJain92 Apr 23, 2024
862e9ff
Suggested issue linking fix while creation - #275 (#277)
kevin-mac-aj Apr 23, 2024
187d392
patch version
patelradhika Apr 30, 2024
d90a422
Merge branch 'prod' into master
patelradhika Apr 30, 2024
5e53f01
fix prod image name
patelradhika Apr 30, 2024
df2ba2d
Merge branch 'prod' into master
patelradhika Apr 30, 2024
9aad119
commenter user info added (#279)
kevin-mac-aj Apr 30, 2024
0f55c3c
Fix/issues (#286)
TanmayJain92 May 20, 2024
b08f3c2
Bump patch version
patelradhika May 20, 2024
2a43f62
Merge branch 'prod' into master
patelradhika May 20, 2024
3a38f67
Email a pdf report
IvyMMutiso May 23, 2024
6ff2a8a
Merge branch 'master' of github.com:buildly-release-management/buildl…
IvyMMutiso May 23, 2024
8b59174
Merge pull request #294 from buildly-release-management/email-pdf-report
odenypeter May 24, 2024
d003a04
Email pdf report (#295)
IvyMMutiso May 28, 2024
396cb3d
Rename navbar, pull report to insights (#296)
patelradhika May 29, 2024
b3c65b2
fix github actions
patelradhika May 29, 2024
70c0e3c
fix github actions
patelradhika May 29, 2024
52b9ac5
Merge branch 'prod'
patelradhika May 29, 2024
54c8b0d
fix webpack for production
patelradhika May 29, 2024
67846ad
Merge branch 'prod'
patelradhika May 29, 2024
6d79961
fix webpack output
patelradhika May 29, 2024
998ed56
fix initialize container
patelradhika May 29, 2024
bdf59e3
fix window.env issues in index and saga files
patelradhika May 30, 2024
cda9ad0
Fix budget (#302)
odenypeter May 30, 2024
103bd05
Merge branch 'prod' into master
patelradhika May 30, 2024
1ad717e
fix window env setup
patelradhika May 30, 2024
01b719b
revert env changes from json to js
patelradhika May 30, 2024
1589962
refactor report data
odenypeter Jun 6, 2024
9e4e865
clen report
odenypeter Jun 8, 2024
f4112e8
initial chatbot babble changes
patelradhika Jun 11, 2024
923c472
clean reports
odenypeter Jun 13, 2024
35c0df5
Merge pull request #306 from buildly-release-management/clean-reports
odenypeter Jun 13, 2024
0324eca
Patch version
patelradhika Jun 13, 2024
986e118
Merge branch 'prod' into master
patelradhika Jun 13, 2024
3c98ad8
welcome message change
patelradhika Jun 19, 2024
03ce7d4
Create docker-image.yml
glind Jun 21, 2024
e0f6863
Merge pull request #310 from buildly-release-management/glind-patch-1
glind Jun 21, 2024
1373d19
testing changes
patelradhika Jun 25, 2024
a7d8366
Merge branch 'master' into fix/chatbot-changes
patelradhika Jun 25, 2024
3fec45f
update goggle analytics tag
patelradhika Jun 26, 2024
29c4df9
Merge pull request #311 from buildly-release-management/fix/chatbot-c…
odenypeter Jun 26, 2024
611fadb
Round off a release progress value
IvyMMutiso Jun 28, 2024
42f1e18
Merge branch 'master' of github.com:buildly-release-management/buildl…
IvyMMutiso Jun 28, 2024
fe045e5
Add logic to cancel a subscription
IvyMMutiso Jul 3, 2024
62bacc5
fix missing env setup
patelradhika Jul 3, 2024
90a6d92
Subscription enhancement
IvyMMutiso Jul 8, 2024
24c3cf9
Subscription enhancements
IvyMMutiso Jul 8, 2024
21d8e5d
fix the new product save issue
patelradhika Jul 10, 2024
24f2b66
Merge branch 'prod' into master
patelradhika Jul 10, 2024
b81cbbc
Kanban card styling
IvyMMutiso Jul 10, 2024
a9b0530
Merge pull request #312 from buildly-release-management/subscription-…
odenypeter Jul 11, 2024
87714eb
suggested issue display changes
patelradhika Jul 11, 2024
44ba533
Merge pull request #315 from buildly-release-management/feat/suggeste…
odenypeter Jul 11, 2024
be7afa4
initial changes
patelradhika Jul 16, 2024
e559dbe
adding API call to babble BE
patelradhika Jul 17, 2024
7c1ff9e
fix testing errors
patelradhika Jul 18, 2024
002e236
Merge pull request #317 from buildly-release-management/feat/user-sto…
IvyMMutiso Jul 19, 2024
a9e5913
add user profile input in product form
patelradhika Jul 23, 2024
05a7510
block comma in the profile input
patelradhika Jul 23, 2024
0ad84ed
fix API call to POST
patelradhika Jul 23, 2024
af485ad
remove blocking comma from user profile input
patelradhika Jul 23, 2024
fe4759d
Merge pull request #318 from buildly-release-management/feat/add-user…
IvyMMutiso Jul 23, 2024
d18a225
patch version
patelradhika Jul 24, 2024
9378c13
Merge branch 'prod' into master
patelradhika Jul 24, 2024
e66bc45
fix clearing user stories on close
patelradhika Jul 24, 2024
42fcd99
Merge branch 'prod' into master
patelradhika Jul 24, 2024
8fd5dfa
Refactor codebase (#332)
patelradhika Aug 14, 2024
02008f5
fix typo error
patelradhika Aug 14, 2024
69c2551
change insights to labs
patelradhika Aug 20, 2024
6c8dbb7
filter users with organization attached
patelradhika Aug 20, 2024
b17f3a7
Merge branch 'prod' into master
patelradhika Aug 20, 2024
03cf5c6
Fix v0.9.0 testing errors (#336)
patelradhika Aug 21, 2024
71f0fd7
Merge branch 'prod' into master
patelradhika Aug 21, 2024
0d1580f
fix testing errors for status board (#338)
patelradhika Aug 21, 2024
3664540
Merge branch 'prod' into master
patelradhika Aug 26, 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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "buildly-react-template",
"version": "v0.9.2",
"version": "v0.9.3",
"description": "Frontend Template from Buildly built using the React framework",
"main": "src/index.js",
"private": true,
Expand Down
1 change: 1 addition & 0 deletions src/pages/ProductRoadmap/ProductRoadmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ const ProductRoadmap = ({ history }) => {
history.push(routes.STATUS_BOARD, {
from: location.pathname,
product_uuid: selectedProduct,
editStatus: selectedProduct && _.toNumber(selectedProduct) !== 0 && _.includes(_.uniq(_.map(statusData, 'product_uuid')), selectedProduct),
});
};

Expand Down
93 changes: 76 additions & 17 deletions src/pages/ProductRoadmap/forms/StatusBoard.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import Loader from '@components/Loader/Loader';
import useAlert from '@hooks/useAlert';
import { getAllStatusQuery } from '@react-query/queries/release/getAllStatusQuery';
import { useCreateStatusMutation } from '@react-query/mutations/release/createStatusMutation';
import { useUpdateStatusMutation } from '@react-query/mutations/release/updateStatusMutation';
import { useDeleteStatusMutation } from '@react-query/mutations/release/deleteStatusMutation';
import { STATUSTYPES } from '../ProductRoadmapConstants';

const useStyles = makeStyles((theme) => ({
Expand All @@ -42,11 +44,7 @@ const useStyles = makeStyles((theme) => ({

const StatusBoard = ({ history, location }) => {
const classes = useStyles();
const editData = (
location.state
&& location.state.type === 'edit'
&& location.state.data
) || {};
const editStatus = location.state && location.state.editStatus;
const product_uuid = location.state && location.state.product_uuid;
const redirectTo = location.state && location.state.from;

Expand All @@ -70,13 +68,20 @@ const StatusBoard = ({ history, location }) => {
const filteredStatus = _.filter(statuses, { product_uuid });
const statusDefault = _.find(filteredStatus, (s) => s.is_default_status);
setStatus(_.map(filteredStatus, 'name'));
setDefaultStatus(statusDefault.name || '');
setDefaultStatus((!!statusDefault && statusDefault.name) || '');
}, [statuses]);

const closeFormModal = () => {
const filteredStatus = _.filter(statuses, { product_uuid });
const statusDefault = _.find(filteredStatus, (s) => s.is_default_status);

const dataHasChanged = (
(!_.isEmpty(editData) && !_.isEqual(status, editData.status))
|| (_.isEmpty(editData) && !_.isEmpty(status))
(editStatus && !_.isEqual(status, _.map(statuses, 'name')))
|| (editStatus && (
(!statusDefault && !!defaultStatus)
|| (!!statusDefault && !_.isEqual(defaultStatus, statusDefault.name))
))
|| (!editStatus && !_.isEmpty(status))
);

if (dataHasChanged) {
Expand Down Expand Up @@ -113,17 +118,70 @@ const StatusBoard = ({ history, location }) => {
};

const { mutate: createStatusMutation, isLoading: isCreatingStatusLoading } = useCreateStatusMutation(history, redirectTo, product_uuid, discardFormData, displayAlert);
const { mutate: updateStatusMutation, isLoading: isUpdatingStatusLoading } = useUpdateStatusMutation(history, redirectTo, product_uuid, discardFormData, displayAlert);
const { mutate: deleteStatusMutation, isLoading: isDeletingStatusLoading } = useDeleteStatusMutation(history, redirectTo, product_uuid, discardFormData, displayAlert);

const handleSubmit = (event) => {
event.preventDefault();
const statusData = _.map(status, (col) => ({
product_uuid,
name: col,
description: col,
status_tracking_id: null,
is_default_status: !!(col === defaultStatus),
}));
createStatusMutation(statusData);
if (!editStatus) {
const statusData = _.map(status, (col) => ({
product_uuid,
name: col,
description: col,
status_tracking_id: null,
is_default_status: _.isEqual(col, defaultStatus),
}));

createStatusMutation(statusData);
} else {
let createStatusData = [];
let editStatusData = [];
let deleteStatusData = [];

// Existing status
const filteredStatus = _.filter(statuses, { product_uuid });
const statusDefault = _.find(filteredStatus, (s) => s.is_default_status);
const nameList = _.map(filteredStatus, 'name');

_.forEach(nameList, (name) => {
if (!_.includes(status, name)) {
const st = _.find(filteredStatus, { name });
if (!_.isEmpty(st)) {
deleteStatusData = [...deleteStatusData, st];
}
}
});

_.forEach(status, (st) => {
if (_.includes(nameList, st)) {
const existingStatus = _.find(filteredStatus, { name: st });
if (!_.isEmpty(existingStatus)) {
editStatusData = [...editStatusData, { ...existingStatus, is_default_status: _.isEqual(st, defaultStatus) }];
}
} else {
createStatusData = [
...createStatusData,
{
product_uuid,
name: st,
description: st,
status_tracking_id: null,
is_default_status: _.isEqual(st, defaultStatus),
},
];
}
});

if (!_.isEmpty(deleteStatusData)) {
deleteStatusMutation(deleteStatusData);
}
if (!_.isEmpty(editStatusData)) {
updateStatusMutation(editStatusData);
}
if (!_.isEmpty(createStatusData)) {
createStatusMutation(createStatusData);
}
}
};

const submitDisabled = () => {
Expand Down Expand Up @@ -155,7 +213,8 @@ const StatusBoard = ({ history, location }) => {
setConfirmModal={setConfirmModal}
handleConfirmModal={discardFormData}
>
{(isCreatingStatusLoading || isAllStatusLoading) && <Loader open={isCreatingStatusLoading || isAllStatusLoading} />}
{(isCreatingStatusLoading || isUpdatingStatusLoading || isDeletingStatusLoading || isAllStatusLoading)
&& <Loader open={isCreatingStatusLoading || isUpdatingStatusLoading || isDeletingStatusLoading || isAllStatusLoading} />}
<form className={classes.form} noValidate onSubmit={handleSubmit}>
<Grid container spacing={isDesktop ? 2 : 0}>
<Grid item xs={12}>
Expand Down
38 changes: 38 additions & 0 deletions src/react-query/mutations/release/deleteStatusMutation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { useMutation, useQueryClient } from 'react-query';
import { httpService } from '@modules/http/http.service';
import _ from 'lodash';

export const useDeleteStatusMutation = (history, redirectTo, product_uuid, discardFormData, displayAlert) => {
const queryClient = useQueryClient();

return useMutation(
async (deleteStatusData) => {
const statuses = await Promise.all(
_.map(deleteStatusData, (status_data) => (
httpService.makeRequest(
'delete',
`${window.env.API_URL}release/status/${status_data.status_uuid}/`,
status_data,
)
)),
);
const finalResponse = _.flatMap(_.map(statuses, 'data'));
return finalResponse;
},
{
onSuccess: async () => {
await queryClient.invalidateQueries({ queryKey: ['allStatuses', product_uuid] });
displayAlert('success', 'Status deleted successfully');
discardFormData();
if (history) {
history.push(redirectTo);
}
},
},
{
onError: () => {
displayAlert('error', 'Unable to delete status!');
},
},
);
};
48 changes: 48 additions & 0 deletions src/react-query/mutations/release/updateStatusMutation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import { useMutation, useQueryClient } from 'react-query';
import { httpService } from '@modules/http/http.service';
import _ from 'lodash';

export const useUpdateStatusMutation = (history, redirectTo, product_uuid, discardFormData, displayAlert) => {
const queryClient = useQueryClient();

return useMutation(
async (editStatusData) => {
let finalResponse;
if (_.size(editStatusData) > 1) {
const statuses = await Promise.all(
_.map(editStatusData, (status_data) => (
httpService.makeRequest(
'put',
`${window.env.API_URL}release/status/${status_data.status_uuid}/`,
status_data,
)
)),
);
finalResponse = _.flatMap(_.map(statuses, 'data'));
} else {
const status = await httpService.makeRequest(
'put',
`${window.env.API_URL}release/status/${editStatusData.status_uuid}`,
editStatusData,
);
finalResponse = status.data;
}
return finalResponse;
},
{
onSuccess: async () => {
await queryClient.invalidateQueries({ queryKey: ['allStatuses', product_uuid] });
displayAlert('success', 'Status updated successfully');
discardFormData();
if (history) {
history.push(redirectTo);
}
},
},
{
onError: () => {
displayAlert('error', 'Unable to update status!');
},
},
);
};
Loading