Skip to content

Commit

Permalink
metric create speedup + delete console logs (#609)
Browse files Browse the repository at this point in the history
  • Loading branch information
diego-escobedo authored Feb 23, 2023
1 parent 29093a6 commit abb5cf5
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ const SubscriptionView: FC<Props> = ({
);

const cancelSubscription = (plan_id, subscription_filters) => {
console.log(plan_id, subscription_filters);
const query_params: CancelSubscriptionQueryParams = {
customer_id,
plan_id,
Expand Down Expand Up @@ -249,7 +248,6 @@ const SubscriptionView: FC<Props> = ({
[] as { label: string; value: string }[]
);
setPlanList(newplanList);
console.log(newplanList);
}
}, [customer_id, plans]);

Expand Down Expand Up @@ -560,7 +558,6 @@ const SubscriptionView: FC<Props> = ({
key={index}
onSelect={() => {
setSelectedSubPlan(subPlan);
console.log(selectedSubPlan);
switch (index) {
case 0:
setTitle("Switch Plan");
Expand Down
9 changes: 2 additions & 7 deletions frontend/src/components/Metrics/CreateMetricForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ function CreateMetricForm(props: {
onCancel={props.onCancel}
onOk={() => {
form.validateFields().then((values) => {
const { filters } = values;

var { filters } = values;
filters = filters || [];
filters.forEach((filter) => {
if (
(filter.operator === "isin" || filter.operator === "isnotin") &&
Expand Down Expand Up @@ -723,11 +723,6 @@ function CreateMetricForm(props: {
rules={[
({ getFieldValue }) => ({
validator(_, value) {
console.log("VALUE", value);
console.log(
"showTag",
showTags[field.name] || false
);
if (showTags[field.name] || false) {
if (
Array.isArray(value) &&
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/Metrics/MetricDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const MetricDetails: FC<MetricDetailsProps> = ({ metric, onclose }) => {
const formattedSQL = metric.custom_sql
? format(metric.custom_sql, { language: "postgresql" })
: "";
console.log(formattedSQL);
const mutation = useMutation(
(metric_id: string) => Metrics.archiveMetric(metric_id),
{
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/Metrics/MetricTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ const MetricTable: FC<Props> = ({ metricArray }) => {
record.numeric_filters,
record.categorical_filters
);
console.log("filters", filters);
if (filters) {
return (
<div className="space-y-2">
Expand Down
5 changes: 2 additions & 3 deletions frontend/src/components/Plans/PlanDetails/SwitchVersions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function getPriceAdjustmentEnding(
) {
switch (type) {
case "percentage":
return `${amount }%`;
return `${amount}%`;
case "fixed":
return `${code} ${amount}`;
case "price_override":
Expand Down Expand Up @@ -113,7 +113,6 @@ const SwitchVersions: FC<SwitchVersionProps> = ({
{versions.map((version) => (
<div
onClick={(e) => {
console.log(e.target);
refetch();
setSelectedVersion(version);
}}
Expand All @@ -131,7 +130,7 @@ const SwitchVersions: FC<SwitchVersionProps> = ({
))}
<Link
type="text"
to={`/create-version/${ selectedVersion?.plan_id}`}
to={`/create-version/${selectedVersion?.plan_id}`}
className="mx-4"
>
<div className="flex items-center justify-center px-2 py-2 rounded-[20px] hover:bg-[#EAEAEB]">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ export function AppCard({
title.includes("Stripe") || title.includes("Braintree")
? handleClickConnect
: () => {
console.log("title", title);
toast.error(
"Upgrade to get access to this integration"
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ const IntegrationsTab: FC = () => {
toast.success(
`OAuth flow succeeded for provider "${result.providerConfigKey}"!`
);
console.log("RESULT FROM OAUTH: ", result);
const inner_data: BraintreeConnectionRequestType = {
nango_connected: true,
};
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/components/Settings/settings/tabs/TeamTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,12 @@ const TeamTab: FC = () => {
onSuccess: (response: any) => {
const link = response.link;
setInviteLink(link);
console.log(link);
if (link) {
setVisibleInviteLink(true);
}
refetch();
},
onError: (error: any) => {
console.log(error.response);
if (error.response.data.detail) {
toast.error(error.response.data.detail);
} else {
Expand Down
3 changes: 0 additions & 3 deletions frontend/src/integrations/pages/NetsuiteIntegrationView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ const downloadFile = async (s3link) => {
toast.error("No file to download");
return;
}
console.log("s3link", s3link);
window.open(s3link);
};

Expand All @@ -26,9 +25,7 @@ const NetsuiteIntegrationView: FC = () => {
const getInvoicesCSV = async () => {
try {
const response = await Netsuite.invoices();
console.log("response", response);
const csvUrl = response.url;
console.log("csvUrl", csvUrl);
downloadFile(csvUrl);
} catch (err) {
toast.error("Error downloading file");
Expand Down

0 comments on commit abb5cf5

Please sign in to comment.