|
|
@ -42,8 +42,8 @@ const getYoeRange = (yoeCategory: number | null | undefined) => {
|
|
|
|
|
|
|
|
|
|
|
|
export const offersRouter = createRouter().query('list', {
|
|
|
|
export const offersRouter = createRouter().query('list', {
|
|
|
|
input: z.object({
|
|
|
|
input: z.object({
|
|
|
|
cityId: z.string().nullish(),
|
|
|
|
|
|
|
|
companyId: z.string().nullish(),
|
|
|
|
companyId: z.string().nullish(),
|
|
|
|
|
|
|
|
countryId: z.string().nullish(),
|
|
|
|
currency: z.string().nullish(),
|
|
|
|
currency: z.string().nullish(),
|
|
|
|
dateEnd: z.date().nullish(),
|
|
|
|
dateEnd: z.date().nullish(),
|
|
|
|
dateStart: z.date().nullish(),
|
|
|
|
dateStart: z.date().nullish(),
|
|
|
@ -131,11 +131,15 @@ export const offersRouter = createRouter().query('list', {
|
|
|
|
where: {
|
|
|
|
where: {
|
|
|
|
AND: [
|
|
|
|
AND: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cityId:
|
|
|
|
location: {
|
|
|
|
input.cityId != null && input.cityId.length !== 0
|
|
|
|
state: {
|
|
|
|
? input.cityId
|
|
|
|
countryId:
|
|
|
|
|
|
|
|
input.countryId != null && input.countryId.length !== 0
|
|
|
|
|
|
|
|
? input.countryId
|
|
|
|
: undefined,
|
|
|
|
: undefined,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
offersIntern: {
|
|
|
|
offersIntern: {
|
|
|
|
isNot: null,
|
|
|
|
isNot: null,
|
|
|
@ -247,11 +251,15 @@ export const offersRouter = createRouter().query('list', {
|
|
|
|
where: {
|
|
|
|
where: {
|
|
|
|
AND: [
|
|
|
|
AND: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cityId:
|
|
|
|
location: {
|
|
|
|
input.cityId != null && input.cityId.length !== 0
|
|
|
|
state: {
|
|
|
|
? input.cityId
|
|
|
|
countryId:
|
|
|
|
|
|
|
|
input.countryId != null && input.countryId.length !== 0
|
|
|
|
|
|
|
|
? input.countryId
|
|
|
|
: undefined,
|
|
|
|
: undefined,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
offersIntern: {
|
|
|
|
offersIntern: {
|
|
|
|
is: null,
|
|
|
|
is: null,
|
|
|
|