Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style fixes #14

Merged
merged 1 commit into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions backend/app/DomainObjects/MessageDomainObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ public static function getAllowedSorts(): AllowedSorts
return new AllowedSorts(
[
self::CREATED_AT => [
'asc' => 'Sent Date Ascending',
'desc' => 'Sent Date Descending',
'asc' => 'Sent Date Oldest',
'desc' => 'Sent Date Newest',
],
self::SUBJECT => [
'asc' => 'Subject Ascending',
'desc' => 'Subject Descending',
'asc' => 'Subject A-Z',
'desc' => 'Subject Z-A',
],
],
);
Expand Down
1 change: 1 addition & 0 deletions backend/app/Resources/Order/OrderItemResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public function toArray(Request $request): array
'quantity' => $this->getQuantity(),
'ticket_id' => $this->getTicketId(),
'item_name' => $this->getItemName(),
'price_before_discount' => $this->getPriceBeforeDiscount(),
'taxes_and_fees_rollup' => $this->getTaxesAndFeesRollup(),
];
}
Expand Down
2 changes: 1 addition & 1 deletion backend/app/Resources/Order/OrderItemResourcePublic.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function toArray(Request $request): array
'total_tax' => $this->getTotalTax(),
'total_gross' => $this->getTotalGross(),
'taxes_and_fees_rollup' => $this->getTaxesAndFeesRollup(),
'ticket' => $this->when(!!$this->getTicket(), fn() => new TicketResourcePublic($this->getTicket())),
'ticket' => $this->when((bool)$this->getTicket(), fn() => new TicketResourcePublic($this->getTicket())),
];
}
}
1 change: 1 addition & 0 deletions backend/resources/views/emails/event/message.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<b>{{ $event->getTitle() }}</b>. If you believe you have received this email in error,
please contact the event organizer at <a
href="mailto:{{$eventSettings->getSupportEmail()}}">{{$eventSettings->getSupportEmail()}}</a>.
If you believe this is spam, please report it to <a href="mailto:{{config('mail.from.address')}}">{{config('mail.from.address')}}</a>.
</div>
</x-mail::message>

3 changes: 1 addition & 2 deletions frontend/src/components/common/EventDocumentHead/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable lingui/no-unlocalized-strings */
import {Helmet} from "react-helmet-async";
import {t} from "@lingui/macro";
import {Event} from "../../../types";
import {eventCoverImageUrl, eventHomepageUrl} from "../../../utilites/urlHelper.ts";
import {utcToTz} from "../../../utilites/dates.ts";
Expand All @@ -11,7 +10,7 @@ interface EventDocumentHeadProps {

export const EventDocumentHead = ({event}: EventDocumentHeadProps) => {
const eventSettings = event.settings;
const title = (eventSettings?.seo_title ?? event.title) + ' | ' + t` Powered By Hi.Events`;
const title = (eventSettings?.seo_title ?? event.title) + ' | ' + `Hi.Events`;
const description = eventSettings?.seo_description ?? event.description_preview;
const keywords = eventSettings?.seo_keywords;
const image = eventCoverImageUrl(event);
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/common/OrderSummary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export const OrderSummary = ({event, order, showFreeWhenZeroTotal = true}: Order
<div className={classes.itemValue}>
{!!item.price_before_discount && (
<div style={{color: '#888', marginRight: '5px', display: 'inline-block'}}>

<Currency
currency={event.currency}
price={item.price_before_discount * item.quantity}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/forms/QuestionForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export const QuestionForm = ({form, tickets}: QuestionFormProps) => {
icon: <IconSquareCheck/>,
label: t`Checkboxes`,
value: QuestionType.CHECKBOX,
description: t`These allow multiple selections`,
description: t`Checkbox options allow multiple selections`,
},
{
icon: <IconCircleCheck/>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
margin-bottom: 20px;
padding: 15px;
border-radius: var(--tk-radius-lg);
background-color: var(--tk-secondary);
border: 3px solid var(--tk-secondary);

@include respond-below(md) {
flex-direction: column;
Expand Down
18 changes: 15 additions & 3 deletions frontend/src/components/modals/SendMessageModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ export const SendMessageModal = (props: EventMessageModalProps) => {
is_test: false,
send_copy_to_current_user: false,
type: 'EVENT',
acknowledgement: false,
},
validate: {
acknowledgement: (value) => value === true ? null : t`You must acknowledge that this email is not promotional`,
}
});

const handleSend = (values: any) => {
Expand Down Expand Up @@ -204,8 +208,8 @@ export const SendMessageModal = (props: EventMessageModalProps) => {

<Alert variant={'outline'} mt={20} icon={<IconAlertCircle size="1rem"/>}
title={t`Before you send!`}>
{t`Please ensure you only send emails directly related to the order. Promotional emails
should not be sent using this form.`}
{t`Only important emails, which are directly related to this event, should be sent using this form.
Any misuse, including sending promotional emails, will lead to an immediate account ban.`}
</Alert>

{!isAccountVerified && (
Expand All @@ -214,7 +218,15 @@ export const SendMessageModal = (props: EventMessageModalProps) => {
</Alert>
)}

<Button mt={20} loading={sendMessageMutation.isLoading} type={'submit'} fullWidth leftSection={<IconSend/>}>
<Switch mt={20} {...form.getInputProps('acknowledgement', {type: 'checkbox'})}
label={(
<Trans>
This email is not promotional and is directly related to the event.
</Trans>
)}/>

<Button mt={20} loading={sendMessageMutation.isLoading} type={'submit'} fullWidth
leftSection={<IconSend/>}>
{form.values.is_test ? t`Send Test` : t`Send`}
</Button>
</fieldset>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/styles/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
--tk-primary: #472e78;
--tk-secondary: #efebf7;
--tk-secondary-text: #7c7091;
--tk-color-gray: #3c2b5c05;
--tk-color-gray: #f7f6f8;
--tk-color-gray-2: #e2e2e2;
--tk-color-gray-dark: #838383;
--tk-color-money-green: #00b894;
Expand Down
Loading