Skip to content

Commit

Permalink
Merge pull request #1231 from brave/master
Browse files Browse the repository at this point in the history
Production Release 2024-06-13
  • Loading branch information
IanKrieger authored Jun 13, 2024
2 parents 8f06673 + c7a54f0 commit 59fa77c
Show file tree
Hide file tree
Showing 42 changed files with 908 additions and 1,292 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7
uses: github/codeql-action/init@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # v3.25.8
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -53,7 +53,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7
uses: github/codeql-action/autobuild@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # v3.25.8

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -67,4 +67,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7
uses: github/codeql-action/analyze@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # v3.25.8
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export default tseslint.config(
"zonedTimeToUtc",
"utcToZonedTime",
"graphql",
"getGenericMultiSelect",
],
ignoreProperty: [
"documentTitle",
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"@mui/icons-material": "5.15.19",
"@mui/lab": "5.0.0-alpha.170",
"@mui/material": "5.15.19",
"@mui/x-data-grid": "7.6.1",
"@mui/x-date-pickers": "7.6.1",
"@mui/x-data-grid": "7.6.2",
"@mui/x-date-pickers": "7.6.2",
"bignumber.js": "9.1.2",
"dayjs": "1.11.11",
"formik": "2.4.6",
Expand Down Expand Up @@ -66,7 +66,7 @@
"@lingui/cli": "4.11.1",
"@lingui/vite-plugin": "4.11.1",
"@parcel/watcher": "2.4.1",
"@types/lodash": "4.17.4",
"@types/lodash": "4.17.5",
"@types/papaparse": "5.3.14",
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
Expand All @@ -81,13 +81,13 @@
"eslint-plugin-react": "7.34.2",
"eslint-plugin-react-hooks": "4.6.2",
"husky": "9.0.11",
"knip": "5.17.3",
"knip": "5.18.1",
"lint-staged": "15.2.5",
"npm-run-all2": "6.2.0",
"prettier": "3.2.5",
"prettier": "3.3.1",
"typescript": "5.4.5",
"typescript-eslint": "7.11.0",
"vite": "5.2.12",
"typescript-eslint": "7.12.0",
"vite": "5.2.13",
"vite-plugin-checker": "0.6.4",
"vite-tsconfig-paths": "4.3.2",
"vitest": "1.6.0"
Expand Down
205 changes: 101 additions & 104 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

15 changes: 12 additions & 3 deletions src/auth/components/AdvertiserDetailsForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { useHistory } from "react-router-dom";
import {
AdvertiserBillingAddressDocument,
PaymentType,
UpdateAdvertiserDocument,
} from "@/graphql-client/graphql";
import { AdvertiserAgreed } from "@/auth/components/AdvertiserAgreed";
import { FormikSubmitButton } from "@/form/FormikButton";
Expand All @@ -20,6 +19,16 @@ import { useTrackWithMatomo } from "@/hooks/useTrackWithMatomo";
import _ from "lodash";
import { msg, Trans } from "@lingui/macro";
import { useMutation, useQuery } from "@apollo/client";
import { graphql } from "@/graphql-client/index";

export const Advertiser_Update = graphql(`
mutation UpdateAdvertiser($input: UpdateSelfServeAdvertiserInput!) {
updateSelfServeAdvertiser(updateAdvertiserInput: $input) {
id
publicKey
}
}
`);

export function AdvertiserDetailsForm() {
const { trackMatomoEvent } = useTrackWithMatomo({
Expand All @@ -35,7 +44,7 @@ export function AdvertiserDetailsForm() {
initialAdvertiserForm(!requiresPaymentAgree),
);

const [mutation] = useMutation(UpdateAdvertiserDocument, {
const [mutation] = useMutation(Advertiser_Update, {
async onCompleted() {
const user = await getUser();
setSessionUser(user);
Expand Down Expand Up @@ -63,7 +72,7 @@ export function AdvertiserDetailsForm() {
setSubmitting(true);
await mutation({
variables: {
updateAdvertiserInput: {
input: {
id: advertiser.id,
agreed: v.terms && v.tracking && v.payment && v.language,
billingAddress: v.address.id
Expand Down
8 changes: 5 additions & 3 deletions src/components/Date/DateRangePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ export const DateRangePicker = ({

return (
<LocalizationProvider dateAdapter={AdapterDayjs}>
<Stack direction="row" spacing={1} margin={1}>
<Stack direction="row" spacing={1}>
<DatePicker
label={_(msg`From`)}
value={from}
timezone="UTC"
onChange={(newValue) => {
if (newValue) {
onFromChange(newValue);
onFromChange(newValue.startOf("day"));
}
}}
slotProps={{
Expand All @@ -42,9 +43,10 @@ export const DateRangePicker = ({
<DatePicker
label={_(msg`To`)}
value={to}
timezone="UTC"
onChange={(newValue) => {
if (newValue) {
onToChange(newValue);
onToChange(newValue.endOf("day"));
}
}}
slotProps={{
Expand Down
9 changes: 7 additions & 2 deletions src/graphql-client/gql.ts

Large diffs are not rendered by default.

32 changes: 23 additions & 9 deletions src/graphql-client/graphql.ts

Large diffs are not rendered by default.

110 changes: 101 additions & 9 deletions src/graphql/ads-serve.graphql.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5813,15 +5813,11 @@
"name": "emailVerified",
"description": null,
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
}
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
},
"defaultValue": null,
"defaultValue": "false",
"isDeprecated": false,
"deprecationReason": null
},
Expand Down Expand Up @@ -9192,6 +9188,39 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "updateSelfServeAdvertiser",
"description": null,
"args": [
{
"name": "updateAdvertiserInput",
"description": null,
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "INPUT_OBJECT",
"name": "UpdateSelfServeAdvertiserInput",
"ofType": null
}
},
"defaultValue": null,
"isDeprecated": false,
"deprecationReason": null
}
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "Advertiser",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "updateUser",
"description": null,
Expand Down Expand Up @@ -14526,6 +14555,69 @@
"enumValues": null,
"possibleTypes": null
},
{
"kind": "INPUT_OBJECT",
"name": "UpdateSelfServeAdvertiserInput",
"description": null,
"fields": null,
"inputFields": [
{
"name": "agreed",
"description": "Agreed to Terms And Conditions - Advertiser Facing Dashboard",
"type": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
},
"defaultValue": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "billingAddress",
"description": null,
"type": {
"kind": "INPUT_OBJECT",
"name": "UpdateAddressInput",
"ofType": null
},
"defaultValue": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "id",
"description": null,
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
},
"defaultValue": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "publicKey",
"description": null,
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null,
"isDeprecated": false,
"deprecationReason": null
}
],
"interfaces": null,
"enumValues": null,
"possibleTypes": null
},
{
"kind": "INPUT_OBJECT",
"name": "UpdateUserInput",
Expand All @@ -14552,7 +14644,7 @@
"name": "Boolean",
"ofType": null
},
"defaultValue": null,
"defaultValue": "false",
"isDeprecated": false,
"deprecationReason": null
},
Expand Down
7 changes: 0 additions & 7 deletions src/graphql/advertiser.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ query Advertiser($id: String!) {
}
}

mutation UpdateAdvertiser($updateAdvertiserInput: UpdateAdvertiserInput!) {
updateAdvertiser(updateAdvertiserInput: $updateAdvertiserInput) {
id
publicKey
}
}

fragment AdvertiserCampaigns on Advertiser {
id
name
Expand Down
Loading

0 comments on commit 59fa77c

Please sign in to comment.