Skip to content

Commit

Permalink
Merge pull request #567 from wri/release/queenly-queenwood
Browse files Browse the repository at this point in the history
[RELEASE] Queenly Queenwood
  • Loading branch information
roguenet authored Oct 21, 2024
2 parents 149ad0c + 0a157b3 commit dfe7a10
Show file tree
Hide file tree
Showing 99 changed files with 9,646 additions and 3,000 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"react-if": "^4.1.4",
"react-inlinesvg": "^3.0.0",
"react-joyride": "^2.5.5",
"recharts": "^2.13.0",
"swiper": "^9.0.5",
"tailwind-merge": "^1.14.0",
"typescript": "4.9.4",
Expand Down
3 changes: 3 additions & 0 deletions public/icons/dash.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/airtable-card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/graphic-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/graphic-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/map-img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/images/treeBackground.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ const getTextForActionTable = (
if (item.type === "comment" && entity == "site-polygon") {
return "New Comment";
} else if (item.type === "status" && entity == "site-polygon") {
return `New Status: ${formattedTextStatus(item.status)}`;
const text = `New Status: ${formattedTextStatus(item.status)}`;
if (text === "New Status: Updated") {
return "Updated";
}
return text;
} else if (item.type === "change-request-updated") {
return "Change Request Updated";
} else if (item.request_removed && entity == "site-polygon") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ const QuickActions: FC = () => {
<Button variant="outlined" onClick={() => handleExport("sites")}>
Export Site Reports
</Button>
<Button variant="outlined" onClick={() => handleExport("shapefiles")}>
Export Shapefiles
</Button>
<Divider sx={{ marginBottom: 2 }} />
</Stack>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Button, Labeled, Link, NumberField, useCreatePath, useShowContext } fro

import modules from "@/admin/modules";
import Text from "@/components/elements/Text/Text";
import { downloadFileBlob } from "@/utils/network";

const QuickActions: FC = () => {
const { record } = useShowContext();
const createPath = useCreatePath();
Expand All @@ -29,16 +29,6 @@ const QuickActions: FC = () => {
justifyContent: "space-between"
};

const downloadShapefile = async () => {
try {
if (record && record.name && record.boundary_geojson) {
downloadFileBlob(record.boundary_geojson, `${record.name}_shapefile.geojson`);
}
} catch (error) {
console.error("Error downloading shapefile:", error);
}
};

return (
<Card className="!shadow-none">
<Box paddingX={3.75} paddingY={2}>
Expand Down Expand Up @@ -77,7 +67,6 @@ const QuickActions: FC = () => {
to={getNavigationPath("./4")}
label="Add Monitored Data"
/>
<Button className="button-aside-page-admin" onClick={downloadShapefile} label="Download Shapefile" />
</Stack>
</Box>
</Card>
Expand Down
10 changes: 10 additions & 0 deletions src/assets/icons/ic-user.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/assets/icons/link-aritable.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { Meta, StoryObj } from "@storybook/react";

import ImpactStoryCard from "./ImpactStoryCard";

const meta: Meta<typeof ImpactStoryCard> = {
title: "Components/Elements/Cards/ImpactStoryCard",
component: ImpactStoryCard
};

export default meta;
type Story = StoryObj<typeof ImpactStoryCard>;

export const Default: Story = {
args: {
title: "Impact Story Title",
description: "This is a brief description of the impact story.",
image: "https://via.placeholder.com/150"
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";

import Text from "@/components/elements/Text/Text";
import Icon, { IconNames } from "@/components/extensive/Icon/Icon";
interface ImpactStoryCardProps {
export interface ImpactStoryCardProps {
key?: string;
date: string;
by: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Storyshots Components/Elements/Cards/ImpactStoryCard Default 1`] = `
<div
className="flex cursor-pointer items-center gap-4 overflow-hidden rounded-lg border border-neutral-200 bg-white p-4 hover:bg-grey-200"
>
<img
alt="profile"
className="h-20 w-20 rounded-lg bg-cover"
src="https://via.placeholder.com/150"
/>
<div
className="flex-flex-col flex-1 gap-2 overflow-hidden"
>
<div
className="flex items-center gap-1"
>
<p
className="whitespace-nowrap text-grey-700 text-14-light"
data-testid="txt"
>
undefined by undefined
</p>
<div
style={
Object {
"height": undefined,
"width": 24,
}
}
/>
</div>
<p
className="overflow-hidden text-ellipsis whitespace-nowrap text-darkCustom text-14-bold"
data-testid="txt"
>
Impact Story Title
</p>
<p
className="overflow-hidden text-ellipsis whitespace-nowrap text-grey-700 text-14-light"
data-testid="txt"
>
This is a brief description of the impact story.
</p>
</div>
</div>
`;
Loading

0 comments on commit dfe7a10

Please sign in to comment.