Skip to content

Commit

Permalink
Merge pull request #296 from GTBitsOfGood/Tian/Filter
Browse files Browse the repository at this point in the history
filter related works
  • Loading branch information
thanasis457 authored Oct 5, 2024
2 parents d589fea + 081f92c commit 3d6a5d1
Show file tree
Hide file tree
Showing 16 changed files with 794 additions and 127 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"react-scripts": "^5.0.1",
"react-select": "^3.1.0",
"react-switch": "^7.0.0",
"react-toggle-slider": "^0.4.0",
"react-tooltip": "^5.21.5",
"react-youtube": "^7.11.3",
"reactjs-popup": "^1.5.0",
Expand Down
200 changes: 193 additions & 7 deletions src/assets/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -396,13 +396,103 @@ h2 {
flex-direction: row;
}

.primary-slider {
display: flex;
flex-direction: column;
align-items: start;
justify-content: start;
background-color: #F5F6FA;
border-radius: 8px;
gap: 4px;
width: 60%;
}

.primary-slider-button {
display: flex;
flex-direction: row;
align-items: center;
background-color: white;
border-radius: 8px;
width: 55%;
margin: 0.5rem;
margin-bottom: 0;
}

.primary-slider-text {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-size: 16px;
line-height: 150%;
color: #333333;
margin: .3rem;
margin-right: 2rem;
}

.primary-slider-desription {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-size: 14px;
line-height: 150%;
display: flex;
align-items: center;
color: #828282;
margin: 0;
margin-left: .5rem;
}
.template-header {
display: flex;
flex-direction: column;
justify-content: start;
align-items: start;
padding: 0px;
}

.template-header-title {
font-family: 'Inter';
font-style: normal;
font-weight: 600;
font-size: 20px;
line-height: 150%;
display: flex;
align-items: center;
color: #333333;
margin: 0;
}

.template-header-desription {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-size: 16px;
line-height: 150%;
color: #4F4F4F;
margin: 0;
}

.row-nowrap {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
overflow-x: hidden;
}

.template-add {
box-sizing: border-box;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
padding: 10px 16px;
gap: 4px;
background: rgba(19, 70, 170, 0.06);
border: 2px dashed #226DFF;
border-radius: 4px;
color: #226DFF;
width: 100%;
}

.reverse-column {
display: flex;
flex-direction: column;
Expand All @@ -416,6 +506,15 @@ h2 {
padding-top: 50px;
}

.category-delete-container {
display: flex;
justify-content: end;
}

.category-delete-button {
cursor: pointer;
}

.spinner {
font-size: 10px;
margin: 0px auto;
Expand Down Expand Up @@ -1029,31 +1128,91 @@ h2 {
justify-content: center;
align-items: stretch;
margin-bottom: 12px;
background: #FFFFFF;
border: 1px solid #E0E0E0;
border-radius: 8px;
}


.category-grip {
font-size: 30px;
font-size: 27px;
color: #4f4f4f;
transition: all 200ms;
height: 100%;
border-radius: 8px 0px 0px 8px;
background-color: #F2F2F2;
display: flex;
align-items: center;
justify-content: center;
}

.primary-grip {
font-size: 27px;
color: #4f4f4f;
transition: all 200ms;
height: 100%;
border-radius: 8px 0px 0px 8px;
background-color: #F2F2F2;
display: flex;
align-items: center;
justify-content: center;}

.category-cell-wrapper:hover .category-grip {
font-size: 31px;
color: gray;
background: #226DFF;
}

.category-cell-wrapper:hover .primary-grip {
background: #E0E0E0;
}

.category-cell-container {
display: flex;
flex: 1;
flex-direction: column;
background-color: #f8f9fa;
border-radius: 0 5px 5px 0;
padding: 8px 12px;
transition: border-left 200ms;
}

.category-cell-wrapper:hover .category-cell-container {
border-left: solid #0069d9 10px;
.category-cell-wrapper:hover .category-button-add {
background: #226DFF !important;
border-color: #226DFF !important;
}

.category-button-add {
background: #BDBDBD !important;
border-color: #BDBDBD !important;
}

.category-cell-head-title {
background-color: #FAFBFC !important;
margin-right: 1rem !important;
}

.category-cell-head-select{
background-color: #FAFBFC !important;
}

.template-title {
border-bottom: 2px solid #D9D9D9;
width: 100%;
color: #333333;
font-family: 'Inter';
font-style: normal;
font-weight: 600;
font-size: 24px;
line-height: 150%;
}

.category-button-button {
font-size: 22;
border-radius: 0;
padding: 0;
background-color: white !important;
border: hidden;
cursor: pointer;
align-self: flex-end;
margin-left: 2.5rem;
}

.add-option {
Expand All @@ -1070,7 +1229,34 @@ h2 {
}

.options-item {
flex-direction: row-reverse;
flex-direction: row;
}

.options-item-1{
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}

.options-color {
width: 2.5rem !important;
height: 2.5rem !important;
padding: 3px !important;
border-radius: 50% !important;
border: hidden !important;
cursor: pointer;
overflow: hidden;
}

.options-add-color {
width: 3.5rem !important;
height: 2.5rem !important;
padding: 1px !important;
border: hidden !important;
margin-right: px !important;
cursor: pointer;
overflow: hidden;
}

.options-label {
Expand Down
1 change: 0 additions & 1 deletion src/components/chat/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ async function sendSlackMessage(email, message) {
},
body: JSON.stringify(data),
};
console.log(requestOptions);
fetch("https://bit-bot-five.vercel.app/bog/mapscout", requestOptions);
}

Expand Down
3 changes: 0 additions & 3 deletions src/components/dashboard/ActionForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ const ActionForm = (props) => {
onClick={() => {
const data = actions;
data[index].selected = !data[index].selected; //! UNSURE
console.log(data);
console.log(actions[index].selected);
setActions(data);
setTimeout(() => props.onChange(actions), 100);
}}
Expand All @@ -62,7 +60,6 @@ const ActionForm = (props) => {
onChange={(e) => {
const data = actions;
actions[index].linkText = (e.target as HTMLInputElement).value;
console.log((e.target as HTMLInputElement).value);
setActions(data);
setTimeout(() => props.onChange(actions), 100);
}}
Expand Down
2 changes: 0 additions & 2 deletions src/components/dashboard/AddProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,6 @@ function AddProvider(props) {
),
);
props.history.push(providerRoute);
console.log(providerRoute);
console.log("adding");
} catch (e) {
setError(
"Failed to save changes. Please check your network connection or try again later.",
Expand Down
12 changes: 0 additions & 12 deletions src/components/dashboard/CSV.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,6 @@ const ExportCSV = (props) => {
async function handleDrop(data) {
let oldProviders: { id: string }[] = Array.from(props.providers);
let oldCategories: { id: string }[] = Array.from(props.categories);
console.log("older categories", oldCategories);
console.log("older Providers", oldProviders);
console.log("---------------------------");
console.log("data", data);
console.log("---------------------------");

let mergedProviders = data.slice();
let isDifferent = false;
Expand All @@ -145,7 +140,6 @@ const ExportCSV = (props) => {
}
isDifferent = false;
}
console.log("first for loope");

for (let i = 0; i < mergedProviders.length; i++) {
try {
Expand Down Expand Up @@ -199,7 +193,6 @@ const ExportCSV = (props) => {
.collection("categories")
.doc(trimmedProperty)
.get();
console.log(columns);
if (doc.data()) {
const selectType = doc.data()["select_type"];
if (selectType === 2) {
Expand All @@ -218,7 +211,6 @@ const ExportCSV = (props) => {
}
}

console.log("second for loope");

var columnArr = [];
for (let i = 0; i < data.slice().length; i++) {
Expand All @@ -240,7 +232,6 @@ const ExportCSV = (props) => {
break;
}
}
console.log(containsName);
if (!containsName) {
// create a new object and push it to mergedCategories
var arr = [];
Expand Down Expand Up @@ -309,9 +300,6 @@ const ExportCSV = (props) => {
<CSVReader
config={importConfig}
onUploadAccepted={(results: any) => {
console.log("---------------------------");
console.log(results);
console.log("---------------------------");
handleDrop(results.data);
}}
>
Expand Down
1 change: 0 additions & 1 deletion src/components/dashboard/TimeTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const daysOfWeek = [
];

const TimeTable = (props) => {
console.log(props);
const [days, setDays] = useState(
daysOfWeek.map((item) => ({
day: item,
Expand Down
1 change: 0 additions & 1 deletion src/components/map/ProviderCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export default ({
await setImage(item.imageURL);
setIsLoading(false);
} catch (e) {
console.log(e);
setIsLoading(false);
}
}
Expand Down
Loading

0 comments on commit 3d6a5d1

Please sign in to comment.