Skip to content

Commit

Permalink
Advertisement Management Screen
Browse files Browse the repository at this point in the history
  • Loading branch information
SiddheshKukade committed Oct 19, 2023
1 parent eedc7ab commit d197af0
Show file tree
Hide file tree
Showing 18 changed files with 786 additions and 3 deletions.
20 changes: 20 additions & 0 deletions public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"Block/Unblock": "Block/Unblock",
"Plugins": "Plugins",
"Plugin Store": "Plugin Store",
"Advertisement": "Advertisements",
"allOrganizations": "All Organizations",
"yourOrganization": "Your Organization",
"notification": "Notification",
Expand Down Expand Up @@ -611,5 +612,24 @@
"taskNotCompleted": "The task has not been completed yet",
"event": "Event",
"organization": "Organization"
},
"advertisement": {
"title": "Advertisements",
"pHeading": "Manage Ads",
"activeAds": "Active Campaigns",
"archievedAds": "Completed Campaigns",
"pMessage": "Ads not present for this campaign.",
"delete": "Delete",
"Rname": "Enter name of Advertisement",
"Rtype": "Select type of Advertisement",
"Rlink": "Provide a link for content to be displayed",
"RstartDate": "Select Start Date",
"RendDate": "Select End Date",
"RClose": "Close the window",
"addNew": "Create new advertisement",
"EXname": "Ex. Cookie Shop",
"EXlink": "Ex. http://yourwebsite.com/photo",
"register": "Create Advertisement",
"close": "Close "
}
}
8 changes: 8 additions & 0 deletions public/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -604,5 +604,13 @@
"taskNotCompleted": "La tâche n'est pas encore terminée",
"event": "Événement",
"organization": "Organisation"
},
"advertisement": {
"title": "Publicités",
"pHeading": "Gérer les publicités",
"activeAds": "Campagnes actives",
"archievedAds": "Campagnes terminées",
"pMessage": "Aucune publicité n'est présente pour cette campagne.",
"delete": "Supprimer"
}
}
8 changes: 8 additions & 0 deletions public/locales/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -605,5 +605,13 @@
"taskNotCompleted": "कार्य अभी तक पूरा नहीं हुआ है",
"event": "आयोजन",
"organization": "संगठन"
},
"advertisement": {
"title": "विज्ञापन",
"pHeading": "विज्ञापन प्रबंधन",
"activeAds": "सक्रिय अभियान",
"archievedAds": "संपन्न अभियान",
"pMessage": "इस अभियान के लिए कोई विज्ञापन नहीं हैं।",
"delete": "हटाएँ"
}
}
8 changes: 8 additions & 0 deletions public/locales/sp.json
Original file line number Diff line number Diff line change
Expand Up @@ -605,5 +605,13 @@
"taskNotCompleted": "La tarea aún no se ha completado",
"event": "Evento",
"organization": "Organización"
},
"advertisement": {
"title": "Anuncios",
"pHeading": "Gestionar anuncios",
"activeAds": "Campañas activas",
"archievedAds": "Campañas completadas",
"pMessage": "No hay anuncios disponibles para esta campaña.",
"delete": "Eliminar"
}
}
8 changes: 8 additions & 0 deletions public/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -605,5 +605,13 @@
"taskNotCompleted": "任務還沒完成",
"event": "事件",
"organization": "組織"
},
"advertisement": {
"title": "广告",
"pHeading": "管理广告",
"activeAds": "活动广告",
"archievedAds": "已完成的广告活动",
"pMessage": "此广告活动没有相关广告。",
"delete": "删除"
}
}
2 changes: 2 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import Settings from 'screens/UserPortal/Settings/Settings';
import Donate from 'screens/UserPortal/Donate/Donate';
import Events from 'screens/UserPortal/Events/Events';
import Tasks from 'screens/UserPortal/Tasks/Tasks';
import Advertisements from 'components/Advertisements/Advertisements';

function app(): JSX.Element {
/*const { updatePluginLinks, updateInstalled } = bindActionCreators(
Expand Down Expand Up @@ -108,6 +109,7 @@ function app(): JSX.Element {
<SecuredRoute path="/orgpost" component={OrgPost} />
<SecuredRoute path="/orgsetting" component={OrgSettings} />
<SecuredRoute path="/orgstore" component={AddOnStore} />
<SecuredRoute path="/orgads" component={Advertisements} />
<SecuredRoute path="/users" component={Users} />
<SecuredRoute path="/requests" component={Requests} />
<SecuredRoute path="/blockuser" component={BlockUser} />
Expand Down
21 changes: 21 additions & 0 deletions src/GraphQl/Mutations/mutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,27 @@ export const ADD_PLUGIN_MUTATION = gql`
}
}
`;
export const ADD_ADVERTISEMENT_MUTATION = gql`
mutation (
$orgId: ID!
$name: String!
$link: String!
$type: String!
$startDate: Date!
$endDate: Date!
) {
createAdvertisement(
orgId: $orgId
name: $name
link: $link
type: $type
startDate: $startDate
endDate: $endDate
) {
_id
}
}
`;

export const UPDATE_POST_MUTATION = gql`
mutation UpdatePost($id: ID!, $title: String, $text: String) {
Expand Down
14 changes: 13 additions & 1 deletion src/GraphQl/Queries/Queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,19 @@ export const PLUGIN_GET = gql`
}
}
`;

export const ADVERTISEMENTS_GET = gql`
query getPluginList {
getAdvertisements {
_id
name
type
orgId
link
endDate
startDate
}
}
`;
export const ORGANIZATION_EVENTS_CONNECTION = gql`
query EventsByOrganizationConnection(
$organization_id: ID!
Expand Down
31 changes: 31 additions & 0 deletions src/components/Advertisements/Advertisement.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.container {
display: flex;
}

.logintitle {
color: #707070;
font-weight: 600;
font-size: 20px;
margin-bottom: 30px;
padding-bottom: 5px;
border-bottom: 3px solid #31bb6b;
width: 15%;
}

.actioninput {
text-decoration: none;
margin-bottom: 50px;
border-color: #e8e5e5;
width: 80%;
border-radius: 7px;
padding-top: 5px;
padding-bottom: 5px;
padding-right: 10px;
padding-left: 10px;
box-shadow: none;
}

.actionradio input {
width: fit-content;
margin: inherit;
}
Loading

0 comments on commit d197af0

Please sign in to comment.