chore: remove debug console.log statements
This commit is contained in:
parent
6761d4571e
commit
2e9767f1a0
@ -87,9 +87,7 @@ type AddUserPopupProps = {
|
||||
const AddUserPopup: React.FC<AddUserPopupProps> = ({ onAddUser }) => {
|
||||
const { register, handleSubmit, errors, setValue, control } = useForm<CreateUserData>();
|
||||
|
||||
console.log(errors);
|
||||
const createUser = (data: CreateUserData) => {
|
||||
console.log(data);
|
||||
onAddUser(data);
|
||||
};
|
||||
return (
|
||||
@ -187,8 +185,6 @@ const AdminRoute = () => {
|
||||
const cacheData: any = client.readQuery({
|
||||
query: UsersDocument,
|
||||
});
|
||||
console.log(cacheData);
|
||||
console.log(createData);
|
||||
const newData = produce(cacheData, (draftState: any) => {
|
||||
draftState.users = [...draftState.users, { ...createData.data.createUserAccount }];
|
||||
});
|
||||
@ -217,8 +213,6 @@ const AdminRoute = () => {
|
||||
canInviteUser={user.roles.org == 'admin'}
|
||||
onInviteUser={() => {}}
|
||||
onUpdateUserPassword={(user, password) => {
|
||||
console.log(user);
|
||||
console.log(password);
|
||||
hidePopup();
|
||||
}}
|
||||
onDeleteUser={(userID, newOwnerID) => {
|
||||
|
@ -177,9 +177,6 @@ export const ProjectPopup: React.FC<ProjectPopupProps> = ({ history, name, proje
|
||||
query: GetProjectsDocument,
|
||||
});
|
||||
|
||||
console.log(cacheData);
|
||||
console.log(deleteData);
|
||||
|
||||
const newData = produce(cacheData, (draftState: any) => {
|
||||
draftState.projects = draftState.projects.filter(
|
||||
(project: any) => project.id !== deleteData.data.deleteProject.project.id,
|
||||
@ -253,11 +250,9 @@ const GlobalTopNavbar: React.FC<GlobalTopNavbarProps> = ({
|
||||
onRemoveFromBoard,
|
||||
nameOnly,
|
||||
}) => {
|
||||
console.log(popupContent);
|
||||
const { user, setUserRoles, setUser } = useCurrentUser();
|
||||
const { loading, data } = useMeQuery({
|
||||
onCompleted: data => {
|
||||
console.log('me query has completed!');
|
||||
if (user && user.roles) {
|
||||
setUserRoles({
|
||||
org: user.roles.org,
|
||||
@ -311,9 +306,7 @@ const GlobalTopNavbar: React.FC<GlobalTopNavbarProps> = ({
|
||||
};
|
||||
|
||||
const onOpenSettings = ($target: React.RefObject<HTMLElement>) => {
|
||||
console.log('maybe firing popup');
|
||||
if (popupContent) {
|
||||
console.log('showing popup');
|
||||
showPopup($target, popupContent, 185);
|
||||
}
|
||||
};
|
||||
|
@ -36,7 +36,6 @@ const Projects = () => {
|
||||
ref={$fileUpload}
|
||||
onChange={e => {
|
||||
if (e.target.files) {
|
||||
console.log(e.target.files[0]);
|
||||
const fileData = new FormData();
|
||||
fileData.append('file', e.target.files[0]);
|
||||
const accessToken = getAccessToken();
|
||||
|
@ -244,14 +244,12 @@ const ProjectBoard: React.FC<ProjectBoardProps> = ({ projectID, onCardLabelClick
|
||||
const [toggleTaskLabel] = useToggleTaskLabelMutation({
|
||||
onCompleted: newTaskLabel => {
|
||||
taskLabelsRef.current = newTaskLabel.toggleTaskLabel.task.labels;
|
||||
console.log(taskLabelsRef.current);
|
||||
},
|
||||
});
|
||||
|
||||
const onCreateTask = (taskGroupID: string, name: string) => {
|
||||
if (data) {
|
||||
const taskGroup = data.findProject.taskGroups.find(t => t.id === taskGroupID);
|
||||
console.log(`taskGroup ${taskGroup}`);
|
||||
if (taskGroup) {
|
||||
let position = 65535;
|
||||
if (taskGroup.tasks.length !== 0) {
|
||||
@ -262,7 +260,6 @@ const ProjectBoard: React.FC<ProjectBoardProps> = ({ projectID, onCardLabelClick
|
||||
position = Math.ceil(lastTask.position) * 2 + 1;
|
||||
}
|
||||
|
||||
console.log(`position ${position}`);
|
||||
createTask({
|
||||
variables: { taskGroupID, name, position },
|
||||
optimisticResponse: {
|
||||
|
@ -144,14 +144,11 @@ const Details: React.FC<DetailsProps> = ({
|
||||
cache =>
|
||||
produce(cache, draftCache => {
|
||||
const { prevChecklistID, checklistID, checklistItem } = response.data.updateTaskChecklistItemLocation;
|
||||
console.log(`${checklistID} !== ${prevChecklistID}`);
|
||||
if (checklistID !== prevChecklistID) {
|
||||
const oldIdx = cache.findTask.checklists.findIndex(c => c.id === prevChecklistID);
|
||||
const newIdx = cache.findTask.checklists.findIndex(c => c.id === checklistID);
|
||||
console.log(`oldIdx ${oldIdx} newIdx ${newIdx}`);
|
||||
if (oldIdx > -1 && newIdx > -1) {
|
||||
const item = cache.findTask.checklists[oldIdx].items.find(item => item.id === checklistItem.id);
|
||||
console.log(item);
|
||||
if (item) {
|
||||
draftCache.findTask.checklists[oldIdx].items = cache.findTask.checklists[oldIdx].items.filter(
|
||||
i => i.id !== checklistItem.id,
|
||||
@ -195,7 +192,6 @@ const Details: React.FC<DetailsProps> = ({
|
||||
cache =>
|
||||
produce(cache, draftCache => {
|
||||
const { checklists } = cache.findTask;
|
||||
console.log(deleteData);
|
||||
draftCache.findTask.checklists = checklists.filter(
|
||||
c => c.id !== deleteData.data.deleteTaskChecklist.taskChecklist.id,
|
||||
);
|
||||
@ -450,10 +446,8 @@ const Details: React.FC<DetailsProps> = ({
|
||||
<CreateChecklistPopup
|
||||
onCreateChecklist={checklistData => {
|
||||
let position = 65535;
|
||||
console.log(data.findTask.checklists);
|
||||
if (data.findTask.checklists) {
|
||||
const [lastChecklist] = data.findTask.checklists.slice(-1);
|
||||
console.log(`lastCheclist ${lastChecklist}`);
|
||||
if (lastChecklist) {
|
||||
position = lastChecklist.position * 2 + 1;
|
||||
}
|
||||
|
@ -84,7 +84,6 @@ const LabelManagerEditor: React.FC<LabelManagerEditorProps> = ({
|
||||
const labels = labelsRef.current ? labelsRef.current : [];
|
||||
const taskLabels = taskLabelsRef && taskLabelsRef.current ? taskLabelsRef.current : [];
|
||||
const [currentTaskLabels, setCurrentTaskLabels] = useState(taskLabels);
|
||||
console.log(taskLabels);
|
||||
return (
|
||||
<>
|
||||
<Popup title="Labels" tab={0} onClose={() => hidePopup()}>
|
||||
|
@ -127,7 +127,6 @@ const Project = () => {
|
||||
const [toggleTaskLabel] = useToggleTaskLabelMutation({
|
||||
onCompleted: newTaskLabel => {
|
||||
taskLabelsRef.current = newTaskLabel.toggleTaskLabel.task.labels;
|
||||
console.log(taskLabelsRef.current);
|
||||
},
|
||||
});
|
||||
|
||||
@ -176,8 +175,6 @@ const Project = () => {
|
||||
FindProjectDocument,
|
||||
cache =>
|
||||
produce(cache, draftCache => {
|
||||
console.log(cache);
|
||||
console.log(response);
|
||||
draftCache.findProject.members = cache.findProject.members.filter(
|
||||
m => m.id !== response.data.deleteProjectMember.member.id,
|
||||
);
|
||||
@ -208,8 +205,6 @@ const Project = () => {
|
||||
);
|
||||
}
|
||||
if (data) {
|
||||
console.log(data.findProject);
|
||||
|
||||
labelsRef.current = data.findProject.labels;
|
||||
|
||||
return (
|
||||
|
@ -261,7 +261,6 @@ const Projects = () => {
|
||||
|
||||
const colors = ['#e362e3', '#7a6ff0', '#37c5ab', '#aa62e3', '#e8384f'];
|
||||
if (data && user) {
|
||||
console.log(user);
|
||||
const { projects, teams, organizations } = data;
|
||||
const organizationID = organizations[0].id ?? null;
|
||||
const projectTeams = teams
|
||||
@ -283,7 +282,6 @@ const Projects = () => {
|
||||
}),
|
||||
};
|
||||
});
|
||||
console.log(projectTeams);
|
||||
return (
|
||||
<>
|
||||
<GlobalTopNavbar onSaveProjectName={() => {}} projectID={null} name={null} />
|
||||
|
@ -495,7 +495,6 @@ const Members: React.FC<MembersProps> = ({ teamID }) => {
|
||||
users={data.users}
|
||||
teamMembers={data.findTeam.members}
|
||||
onAddTeamMember={userID => {
|
||||
console.log(`team: ${userID}`);
|
||||
createTeamMember({ variables: { userID, teamID } });
|
||||
}}
|
||||
/>,
|
||||
|
@ -221,7 +221,6 @@ const TeamRoleManagerPopup: React.FC<TeamRoleManagerPopupProps> = ({
|
||||
disabled={!(!hasOwned || (hasOwned && deleteUser))}
|
||||
onClick={() => {
|
||||
if (onDeleteUser) {
|
||||
console.log(`${!hasOwned} || (${hasOwned} && ${deleteUser})`);
|
||||
if (!hasOwned || (hasOwned && deleteUser)) {
|
||||
onDeleteUser(user.id, deleteUser ? deleteUser.value : null);
|
||||
}
|
||||
|
@ -115,7 +115,6 @@ export const Default = () => {
|
||||
]);
|
||||
}}
|
||||
onDeleteItem={itemID => {
|
||||
console.log(`itemID ${itemID}`);
|
||||
setItems(items.filter(item => item.id !== itemID));
|
||||
}}
|
||||
onChangeItemName={(itemID, currentName) => {
|
||||
@ -138,7 +137,7 @@ export const Default = () => {
|
||||
key={item.id}
|
||||
wrapperProps={{}}
|
||||
handleProps={{}}
|
||||
checklistID='id'
|
||||
checklistID="id"
|
||||
itemID={item.id}
|
||||
name={item.name}
|
||||
complete={item.complete}
|
||||
|
@ -566,9 +566,6 @@ const Checklist = React.forwardRef(
|
||||
$name.current.select();
|
||||
}
|
||||
}, [editting]);
|
||||
useEffect(() => {
|
||||
console.log($container);
|
||||
}, [$container]);
|
||||
return (
|
||||
<Wrapper ref={$container} {...wrapperProps}>
|
||||
<WindowTitle>
|
||||
|
@ -35,7 +35,6 @@ export const Default = () => {
|
||||
});
|
||||
const $buttonRef: any = createRef();
|
||||
const onClick = () => {
|
||||
console.log($buttonRef.current.getBoundingClientRect());
|
||||
setMenu({
|
||||
isOpen: !menu.isOpen,
|
||||
left: $buttonRef.current.getBoundingClientRect().right,
|
||||
|
@ -149,7 +149,6 @@ const DueDateManager: React.FC<DueDateManagerProps> = ({ task, onDueDateChange,
|
||||
];
|
||||
const { register, handleSubmit, errors, setValue, setError, formState, control } = useForm<DueDateFormData>();
|
||||
const saveDueDate = (data: any) => {
|
||||
console.log(data);
|
||||
const newDate = moment(`${data.endDate} ${data.endTime}`, 'YYYY-MM-DD h:mm A');
|
||||
if (newDate.isValid()) {
|
||||
onDueDateChange(task, newDate.toDate());
|
||||
@ -168,7 +167,6 @@ const DueDateManager: React.FC<DueDateManagerProps> = ({ task, onDueDateChange,
|
||||
/>
|
||||
);
|
||||
});
|
||||
console.log(`textStartDate ${textStartDate}`);
|
||||
return (
|
||||
<Wrapper>
|
||||
<Form onSubmit={handleSubmit(saveDueDate)}>
|
||||
|
@ -60,15 +60,7 @@ export const Default = () => {
|
||||
onExtraMenuOpen={action('extra menu open')}
|
||||
>
|
||||
<ListCards>
|
||||
<CardComposer
|
||||
onClose={() => {
|
||||
console.log('close!');
|
||||
}}
|
||||
onCreateCard={name => {
|
||||
console.log(name);
|
||||
}}
|
||||
isOpen={false}
|
||||
/>
|
||||
<CardComposer onClose={() => {}} onCreateCard={name => {}} isOpen={false} />
|
||||
</ListCards>
|
||||
</List>
|
||||
);
|
||||
@ -85,15 +77,7 @@ export const WithCardComposer = () => {
|
||||
onExtraMenuOpen={action('extra menu open')}
|
||||
>
|
||||
<ListCards>
|
||||
<CardComposer
|
||||
onClose={() => {
|
||||
console.log('close!');
|
||||
}}
|
||||
onCreateCard={name => {
|
||||
console.log(name);
|
||||
}}
|
||||
isOpen
|
||||
/>
|
||||
<CardComposer onClose={() => {}} onCreateCard={name => {}} isOpen />
|
||||
</ListCards>
|
||||
</List>
|
||||
);
|
||||
@ -124,15 +108,7 @@ export const WithCard = () => {
|
||||
checklists={{ complete: 1, total: 4 }}
|
||||
dueDate={{ isPastDue: false, formattedDate: 'Oct 26, 2020' }}
|
||||
/>
|
||||
<CardComposer
|
||||
onClose={() => {
|
||||
console.log('close!');
|
||||
}}
|
||||
onCreateCard={name => {
|
||||
console.log(name);
|
||||
}}
|
||||
isOpen={false}
|
||||
/>
|
||||
<CardComposer onClose={() => {}} onCreateCard={name => {}} isOpen={false} />
|
||||
</ListCards>
|
||||
</List>
|
||||
);
|
||||
@ -162,15 +138,7 @@ export const WithCardAndComposer = () => {
|
||||
checklists={{ complete: 1, total: 4 }}
|
||||
dueDate={{ isPastDue: false, formattedDate: 'Oct 26, 2020' }}
|
||||
/>
|
||||
<CardComposer
|
||||
onClose={() => {
|
||||
console.log('close!');
|
||||
}}
|
||||
onCreateCard={name => {
|
||||
console.log(name);
|
||||
}}
|
||||
isOpen
|
||||
/>
|
||||
<CardComposer onClose={() => {}} onCreateCard={name => {}} isOpen />
|
||||
</ListCards>
|
||||
</List>
|
||||
);
|
||||
|
@ -59,7 +59,6 @@ const LabelManager = ({ labelColors, label, onLabelEdit, onLabelDelete }: Props)
|
||||
type="submit"
|
||||
onClick={e => {
|
||||
e.preventDefault();
|
||||
console.log(currentColor);
|
||||
if (currentColor) {
|
||||
onLabelEdit(label ? label.id : null, currentLabel ?? '', currentColor);
|
||||
}
|
||||
|
@ -130,7 +130,6 @@ const OpenLabelsButton = () => {
|
||||
const [currentLabel, setCurrentLabel] = useState('');
|
||||
const [labels, setLabels] = useState(labelData);
|
||||
const { showPopup, setTab } = usePopup();
|
||||
console.log(labels);
|
||||
return (
|
||||
<OpenLabelBtn
|
||||
ref={$buttonRef}
|
||||
|
@ -71,7 +71,7 @@ export const Default = () => {
|
||||
isComposerOpen={false}
|
||||
onSaveName={action('on save name')}
|
||||
onOpenComposer={action('on open composer')}
|
||||
onExtraMenuOpen={(taskGroupID, $targetRef) => console.log(taskGroupID, $targetRef)}
|
||||
onExtraMenuOpen={(taskGroupID, $targetRef) => {}}
|
||||
>
|
||||
<ListCards>
|
||||
<Card
|
||||
@ -90,15 +90,7 @@ export const Default = () => {
|
||||
checklists={{ complete: 1, total: 4 }}
|
||||
dueDate={{ isPastDue: false, formattedDate: 'Oct 26, 2020' }}
|
||||
/>
|
||||
<CardComposer
|
||||
onClose={() => {
|
||||
console.log('close!');
|
||||
}}
|
||||
onCreateCard={name => {
|
||||
console.log(name);
|
||||
}}
|
||||
isOpen={false}
|
||||
/>
|
||||
<CardComposer onClose={() => {}} onCreateCard={name => {}} isOpen={false} />
|
||||
</ListCards>
|
||||
</List>
|
||||
</>
|
||||
|
@ -269,7 +269,6 @@ const ResetPasswordTab: React.FC<ResetPasswordTabProps> = ({ onResetPassword })
|
||||
return (
|
||||
<form
|
||||
onSubmit={handleSubmit(data => {
|
||||
console.log(`${data.password} !== ${data.password_confirm}`);
|
||||
if (data.password !== data.password_confirm) {
|
||||
setError('password', { message: 'Passwords must match!', type: 'error' });
|
||||
setError('password_confirm', { message: 'Passwords must match!', type: 'error' });
|
||||
|
@ -247,8 +247,6 @@ const TaskDetails: React.FC<TaskDetailsProps> = ({
|
||||
destination,
|
||||
);
|
||||
const newPosition = getNewDraggablePosition(afterDropDraggables, destination.index);
|
||||
console.log(droppedGroup);
|
||||
console.log(`positiion: ${newPosition}`);
|
||||
onChecklistDrop({ ...droppedGroup, position: newPosition });
|
||||
} else {
|
||||
throw { error: 'task group can not be found' };
|
||||
@ -285,7 +283,6 @@ const TaskDetails: React.FC<TaskDetailsProps> = ({
|
||||
position: newPosition,
|
||||
};
|
||||
onChecklistItemDrop(droppedChecklistItem.taskChecklistID, destination.droppableId, newItem);
|
||||
console.log(newItem);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user