This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {NetworkService} from '@features/network/services/NetworkService'; | |
import {ApiEnvType} from '@features/network/types/ApiEnvType'; | |
import {GetRequest} from '@features/network/types/GetRequest'; | |
import {PostRequest} from '@features/network/types/PostRequest'; | |
import {HttpClient} from '@features/network/utils/HttpClient'; | |
import * as buildEndpointUrl from '../../utils/buildEndpointUrl/buildEndpointUrl'; | |
const getMock = jest.spyOn(HttpClient, 'get'); | |
const postMock = jest.spyOn(HttpClient, 'post'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {ApiEnvType} from '@features/network/types/ApiEnvType'; | |
import * as resolveApiHostUrl from '../resolveApiHostUrl/resolveApiHostUrl'; | |
import buildEndpointUrl from '@features/network/utils/buildEndpointUrl'; | |
jest.mock('../../assets/api_config.json', () => ({ | |
deviceType: 'my_device_type', | |
})); | |
describe('buildEndpointUrl', () => { | |
const resolveApiHostUrlMock = jest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SplashController from './SplashController'; | |
const mockNavigation = { | |
navigate: jest.fn(), | |
}; | |
jest.mock('@features/navigation', () => { | |
return { | |
useNavigation: () => mockNavigation, | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { ButtonProps } from "components/common/Button"; | |
import Button, { LoadingButton } from "components/common/Button"; | |
import { isEmpty } from "lodash"; | |
import type { MutableRefObject, ReactNode } from "react"; | |
import { useCallback, useMemo, useRef } from "react"; | |
import type { UseFormReturn } from "react-hook-form"; | |
import { FormProvider as HookFormProvider, useForm as useHookForm } from "react-hook-form"; | |
import { useTranslation } from "react-i18next"; | |
import type { MutationFunction, UseMutationOptions } from "react-query"; | |
import { useMutation } from "react-query"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AutoComplete as AntdAutoComplete } from "antd"; | |
import type { RefSelectProps } from "antd/lib/select"; | |
import api from "lib/api"; | |
import useRequest from "lib/hooks/useRequest"; | |
import { get, upperFirst } from "lodash"; | |
import type { Title } from "models"; | |
import type { ComponentProps } from "react"; | |
import React, { useRef } from "react"; | |
import type { FieldError, FieldPath } from "react-hook-form"; | |
import { Controller } from "react-hook-form"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="Admin Company Module View"> | |
<form id="companyForm" class="companyForm" role="form" autocomplete="off"> | |
<input type="hidden" name="id" value="{{ identity.getIdentity.identifier }}"> | |
<!-- Actions --> | |
<div class="row form-group"> | |
<div class="col-md-8"> | |
<h3>Company: <span data-bind="text: name"></span></h3> | |
</div> | |
<div class="col-md-4 text-right"> | |
<button class="btn btn-primary btn-save" data-loading-text="Saving..."> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Class CompanyController | |
* @package Ordant\CustomerBundle\Controller | |
*/ | |
class CompanyController extends BaseController | |
{ | |
/** | |
* @Route("/", name="customer_company_list", options={"expose"=true}) | |
* @Template("OrdantCustomerBundle:Company:list.html.twig") | |
* @param \Symfony\Component\HttpFoundation\Request $request |