Skip to content

Commit

Permalink
Updating to NEW COLOR SCHEME (#2984)
Browse files Browse the repository at this point in the history
* changed green to blue

* updated funds section

* people section css updated

* updated Tags section

* venues, action items, advertisments, plugins sections updated

* fixed code coverage test

* fixed code coverage test

---------

Co-authored-by: Rahul Chougule <rahul.chougule@flairlabs.com>
  • Loading branch information
rahulch07 and rahul-fl authored Jan 14, 2025
1 parent 197092f commit 224219d
Show file tree
Hide file tree
Showing 39 changed files with 595 additions and 503 deletions.
4 changes: 2 additions & 2 deletions src/assets/css/app.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion src/components/AddOn/core/AddOnEntry/AddOnEntry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@ function addOnEntry({
</Card.Subtitle>
<Card.Text>{description}</Card.Text>
<Button
className={styles.entryaction}
className={
uninstalledOrgs.includes(currentOrg)
? styles.addButton
: `btn btn-danger ${styles.removeButton}`
}
variant="primary"
// disabled={buttonLoading || !configurable}
disabled={buttonLoading}
Expand Down
54 changes: 0 additions & 54 deletions src/components/AddPeopleToTag/AddPeopleToTag.module.css

This file was deleted.

29 changes: 16 additions & 13 deletions src/components/AddPeopleToTag/AddPeopleToTag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import React, { useEffect, useState } from 'react';
import { Modal, Form, Button } from 'react-bootstrap';
import { useParams } from 'react-router-dom';
import type { InterfaceQueryUserTagsMembersToAssignTo } from 'utils/interfaces';
import styles from './AddPeopleToTag.module.css';
import styles from '../../style/app.module.css';
import type { InterfaceTagUsersToAssignToQuery } from 'utils/organizationTagsUtils';
import {
TAGS_QUERY_DATA_CHUNK_SIZE,
Expand Down Expand Up @@ -106,7 +106,7 @@ const AddPeopleToTag: React.FC<InterfaceAddPeopleToTagProps> = ({
};
},
) => {
if (!fetchMoreResult) /* istanbul ignore next */ return prevResult;
if (!fetchMoreResult) return prevResult;

return {
getUsersToAssignTo: {
Expand All @@ -127,7 +127,7 @@ const AddPeopleToTag: React.FC<InterfaceAddPeopleToTagProps> = ({
const userTagMembersToAssignTo =
userTagsMembersToAssignToData?.getUsersToAssignTo.usersToAssignTo.edges.map(
(edge) => edge.node,
) ?? /* istanbul ignore next */ [];
) ?? [];

const handleAddOrRemoveMember = (member: InterfaceMemberData): void => {
setAssignToMembers((prevMembers) => {
Expand Down Expand Up @@ -173,7 +173,7 @@ const AddPeopleToTag: React.FC<InterfaceAddPeopleToTagProps> = ({
hideAddPeopleToTagModal();
setAssignToMembers([]);
}
} catch (error: unknown) /* istanbul ignore next */ {
} catch (error: unknown) {
const errorMessage =
error instanceof Error ? error.message : tErrors('unknownError');
toast.error(errorMessage);
Expand Down Expand Up @@ -244,7 +244,10 @@ const AddPeopleToTag: React.FC<InterfaceAddPeopleToTagProps> = ({
data-testid={
isToBeAssigned ? 'deselectMemberBtn' : 'selectMemberBtn'
}
variant={!isToBeAssigned ? 'primary' : 'danger'}
// variant={!isToBeAssigned ? 'primary' : 'danger'}
className={
!isToBeAssigned ? styles.editButton : `btn btn-danger btn-sm`
}
>
{isToBeAssigned ? 'x' : '+'}
</Button>
Expand All @@ -263,7 +266,7 @@ const AddPeopleToTag: React.FC<InterfaceAddPeopleToTagProps> = ({
centered
>
<Modal.Header
className="bg-primary"
className={`bg-primary ${styles.modalHeader}`}
data-testid="modalOrganizationHeader"
closeButton
>
Expand Down Expand Up @@ -301,7 +304,7 @@ const AddPeopleToTag: React.FC<InterfaceAddPeopleToTagProps> = ({
<Form.Control
type="text"
id="firstName"
className="bg-light"
className={`bg-light ${styles.inputField}`}
placeholder={tCommon('firstName')}
onChange={(e) =>
setMemberToAssignToSearchFirstName(e.target.value.trim())
Expand All @@ -315,7 +318,7 @@ const AddPeopleToTag: React.FC<InterfaceAddPeopleToTagProps> = ({
<Form.Control
type="text"
id="lastName"
className="bg-light"
className={`bg-light ${styles.inputField}`}
placeholder={tCommon('lastName')}
onChange={(e) =>
setMemberToAssignToSearchLastName(e.target.value.trim())
Expand Down Expand Up @@ -345,8 +348,7 @@ const AddPeopleToTag: React.FC<InterfaceAddPeopleToTagProps> = ({
next={loadMoreMembersToAssignTo}
hasMore={
userTagsMembersToAssignToData?.getUsersToAssignTo
.usersToAssignTo.pageInfo.hasNextPage ??
/* istanbul ignore next */ false
.usersToAssignTo.pageInfo.hasNextPage ?? false
}
loader={<InfiniteScrollLoader />}
scrollableTarget="addPeopleToTagScrollableDiv"
Expand All @@ -357,7 +359,7 @@ const AddPeopleToTag: React.FC<InterfaceAddPeopleToTagProps> = ({
hideFooter={true}
getRowId={(row) => row.id}
slots={{
noRowsOverlay: /* istanbul ignore next */ () => (
noRowsOverlay: () => (
<Stack
height="100%"
alignItems="center"
Expand Down Expand Up @@ -396,16 +398,17 @@ const AddPeopleToTag: React.FC<InterfaceAddPeopleToTagProps> = ({
<Modal.Footer>
<Button
onClick={hideAddPeopleToTagModal}
variant="outline-secondary"
variant="outline-danger"
data-testid="closeAddPeopleToTagModal"
className={styles.removeButton}
>
{tCommon('cancel')}
</Button>
<Button
type="submit"
disabled={addPeopleToTagLoading}
variant="primary"
data-testid="assignPeopleBtn"
className={styles.addButton}
>
{t('assign')}
</Button>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import styles from './AdvertisementEntry.module.css';
import styles from '../../../../style/app.module.css';
import { Button, Card, Col, Row, Spinner, Modal } from 'react-bootstrap';
import { DELETE_ADVERTISEMENT_BY_ID } from 'GraphQl/Mutations/mutations';
import { useMutation } from '@apollo/client';
Expand Down Expand Up @@ -99,7 +99,7 @@ function AdvertisementEntry({
<Row data-testid="AdEntry" xs={1} md={2} className="g-4">
{Array.from({ length: 1 }).map((_, idx) => (
<Col key={idx}>
<Card className={styles.card}>
<Card className={styles.addCard}>
<div className={styles.dropdownContainer}>
<button
className={styles.dropdownButton}
Expand Down Expand Up @@ -163,7 +163,7 @@ function AdvertisementEntry({
</Card.Subtitle>
<div className={styles.buttons}>
<Button
className={styles.entryaction}
className={`${styles.entryaction} ${styles.addButton}`}
variant="primary"
disabled={buttonLoading}
data-testid="AddOnEntry_btn_install"
Expand All @@ -189,12 +189,15 @@ function AdvertisementEntry({
{t('deleteAdvertisementMsg')}
</Modal.Body>
<Modal.Footer>
<Button variant="danger" onClick={toggleShowDeleteModal}>
<Button
className={`btn btn-danger ${styles.removeButton}`}
onClick={toggleShowDeleteModal}
>
{tCommon('no')}
</Button>
<Button
type="button"
className="btn btn-success"
className={`btn ${styles.addButton}`}
onClick={(): void => {
onDelete();
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ function advertisementRegister({
<>
{formStatus === 'register' ? (
<Button
className={styles.modalbtn}
className={styles.dropdown}
variant="primary"
onClick={handleShow}
data-testid="createAdvertisement"
Expand Down Expand Up @@ -286,6 +286,7 @@ function advertisementRegister({
name: e.target.value,
});
}}
className={styles.inputField}
/>
</Form.Group>
<Form.Group className="mb-3">
Expand All @@ -312,6 +313,7 @@ function advertisementRegister({
});
}
}}
className={styles.inputField}
/>
{formState.advertisementMedia && (
<div
Expand Down Expand Up @@ -367,6 +369,7 @@ function advertisementRegister({
type: e.target.value,
});
}}
className={styles.inputField}
>
<option value="POPUP">Popup Ad</option>
<option value="BANNER">Banner Ad </option>
Expand All @@ -385,6 +388,7 @@ function advertisementRegister({
startDate: new Date(e.target.value),
});
}}
className={styles.inputField}
/>
</Form.Group>

Expand All @@ -400,6 +404,7 @@ function advertisementRegister({
endDate: new Date(e.target.value),
});
}}
className={styles.inputField}
/>
</Form.Group>
</Form>
Expand All @@ -408,14 +413,13 @@ function advertisementRegister({
<Button
variant="secondary"
onClick={handleClose}
className={styles.closeButtonAdvertisementRegister}
className={`btn btn-danger ${styles.removeButton}`}
data-testid="addonclose"
>
{tCommon('close')}
</Button>
{formStatus === 'register' ? (
<Button
variant="primary"
onClick={handleRegister}
data-testid="addonregister"
className={styles.addButton}
Expand All @@ -424,9 +428,9 @@ function advertisementRegister({
</Button>
) : (
<Button
variant="primary"
onClick={handleUpdate}
data-testid="addonupdate"
className={styles.addButton}
>
{tCommon('saveChanges')}
</Button>
Expand Down
Loading

0 comments on commit 224219d

Please sign in to comment.