type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
ArrowFunction
dimension => { dimensions.push({ Name: dimension.Name, Value: dimension.Value }) }
iquipsys-positron/iqs-services-cloudwatch-node
src/logic/CloudwatchController.ts
TypeScript
ArrowFunction
(metricDataQueries, callback) => { let getMetricDataParams = { EndTime: endTime, MetricDataQueries: metricDataQueries, StartTime: startTime, // MaxDatapoints: 0, ScanBy: Cloudwatc...
iquipsys-positron/iqs-services-cloudwatch-node
src/logic/CloudwatchController.ts
TypeScript
ArrowFunction
(err, data) => { result.push(data); callback(err, data); }
iquipsys-positron/iqs-services-cloudwatch-node
src/logic/CloudwatchController.ts
TypeScript
ArrowFunction
(err) => { if (err) { // this._logger.error(correlationId, "Error while getMetricData: %s; Stack: %s", err, err.stack); console.log(err, err.stack); // an error occurred } if (callback) callback(err, result); ...
iquipsys-positron/iqs-services-cloudwatch-node
src/logic/CloudwatchController.ts
TypeScript
MethodDeclaration
public getCommandSet(): CommandSet { if (this._commandSet == null) this._commandSet = new CloudwatchCommandSet(this); return this._commandSet; }
iquipsys-positron/iqs-services-cloudwatch-node
src/logic/CloudwatchController.ts
TypeScript
MethodDeclaration
public configure(config: ConfigParams): void { this._logger.configure(config); this._dependencyResolver.configure(config); this._connectionResolver.configure(config); }
iquipsys-positron/iqs-services-cloudwatch-node
src/logic/CloudwatchController.ts
TypeScript
MethodDeclaration
public setReferences(references: IReferences): void { this._logger.setReferences(references); this._dependencyResolver.setReferences(references); this._connectionResolver.setReferences(references); }
iquipsys-positron/iqs-services-cloudwatch-node
src/logic/CloudwatchController.ts
TypeScript
MethodDeclaration
public isOpen(): boolean { return this._opened; }
iquipsys-positron/iqs-services-cloudwatch-node
src/logic/CloudwatchController.ts
TypeScript
MethodDeclaration
public open(correlationId: string, callback: (err: any) => void): void { if (this._opened) { callback(null); return; } this._opened = true; async.series([ (callback) => { this._connectionResolver.resolve(correlationId, (err, connecti...
iquipsys-positron/iqs-services-cloudwatch-node
src/logic/CloudwatchController.ts
TypeScript
MethodDeclaration
public close(correlationId: string, callback: (err: any) => void): void { this._opened = false; this._logsClient = null; if (callback) callback(null); }
iquipsys-positron/iqs-services-cloudwatch-node
src/logic/CloudwatchController.ts
TypeScript
MethodDeclaration
public getLogGroups(correlationId: string, logGroupNamePrefix?: string, limit?: number, callback?: (err: any, result: string) => void) { var params = { limit: limit ? limit : 50, // 50 is default logGroupNamePrefix: logGroupNamePrefix ? logGroupNamePrefix : null }; ...
iquipsys-positron/iqs-services-cloudwatch-node
src/logic/CloudwatchController.ts
TypeScript
MethodDeclaration
public getLogStreams(correlationId: string, logGroupName: string, logStreamNamePrefix?: string, limit?: number, callback?: (err: any, result: string) => void) { var params = { logGroupName: logGroupName, descending: false, limit: limit ? limit : 50, // 50 is default ...
iquipsys-positron/iqs-services-cloudwatch-node
src/logic/CloudwatchController.ts
TypeScript
MethodDeclaration
public getLogEvents(correlationId: string, group: string, stream: string, startTime: Date, endTime: Date, filter: string, limit?: number, callback?: (err: any, results: string) => void): void { var params = { logGroupName: group, /* required */ logStreamNames: [stream], /* requi...
iquipsys-positron/iqs-services-cloudwatch-node
src/logic/CloudwatchController.ts
TypeScript
MethodDeclaration
public getMetricData(correlationId: string, namespace: string, startTime: Date, endTime: Date, period: number, type: string, unit: string, metric: string, callback?: (err: any, result: string) => void): void { let metrics: any; async.series([ (callback) => { let li...
iquipsys-positron/iqs-services-cloudwatch-node
src/logic/CloudwatchController.ts
TypeScript
EnumDeclaration
// -------------------------------- // SIZES // -------------------------------- export enum ESizes { one = 'one', two = 'two', three = 'three', four = 'four', five = 'five', six = 'six', seven = 'seven', eight = 'eight', nine = 'nine', ten = 'ten', eleven = 'eleven', twelve = 'twelve', }
murphyjoseph/rbol
src/theme/constants/sizes.ts
TypeScript
EnumDeclaration
export enum ESizesTypes { spacing = 'spacing', typography = 'typography', container = 'container' }
murphyjoseph/rbol
src/theme/constants/sizes.ts
TypeScript
TypeAliasDeclaration
export type TSizes = keyof typeof ESizes;
murphyjoseph/rbol
src/theme/constants/sizes.ts
TypeScript
TypeAliasDeclaration
export type TSizesTypes = keyof typeof ESizesTypes;
murphyjoseph/rbol
src/theme/constants/sizes.ts
TypeScript
ArrowFunction
({ tooltip = 'Add to list', popoverLayout = ['right', 'top'], itemId, itemType, ...IIconButtonProps }) => { const selfRef = useRef<HTMLAnchorElement>(null); const environment = useSelector(currentEnvironmentSelector); // Loads all boards that has this item owned by the user const ...
Aka-shi/querybook
querybook/webapp/components/BoardItemAddButton/BoardItemAddButton.tsx
TypeScript
ArrowFunction
() => BoardResource.getItemBoardIds(environment.id, itemType, itemId)
Aka-shi/querybook
querybook/webapp/components/BoardItemAddButton/BoardItemAddButton.tsx
TypeScript
ArrowFunction
() => { // If we are showing the board picker popover, // we have to show which board has the item if (showSelectBoardPopover) { fetchBoardIds(); } }
Aka-shi/querybook
querybook/webapp/components/BoardItemAddButton/BoardItemAddButton.tsx
TypeScript
ArrowFunction
(showModal: boolean) => { setShowCreateModal(showModal); setShowSelectBoardPopover(!showModal); }
Aka-shi/querybook
querybook/webapp/components/BoardItemAddButton/BoardItemAddButton.tsx
TypeScript
ArrowFunction
async (boardId: number, boardName: string = 'Untitled') => { if (!(boardIds || []).includes(boardId)) { // Add item await dispatch(addBoardItem(boardId, itemType, itemId)); toast.success(`Item added to the list "${boardName}"!`); } else { ...
Aka-shi/querybook
querybook/webapp/components/BoardItemAddButton/BoardItemAddButton.tsx
TypeScript
ArrowFunction
async (rawBoard: IBoardRaw) => { await handleAddOrRemoveBoardItem(rawBoard.id, rawBoard.name); setShowCreateModal(false); setShowSelectBoardPopover(false); // just in case }
Aka-shi/querybook
querybook/webapp/components/BoardItemAddButton/BoardItemAddButton.tsx
TypeScript
InterfaceDeclaration
export interface ICreateDataDocButtonProps extends Partial<IIconButtonProps> { // from own Props tooltipPos?: TooltipDirection; tooltip?: string; popoverLayout?: PopoverLayout; itemId: number; itemType: BoardItemType; }
Aka-shi/querybook
querybook/webapp/components/BoardItemAddButton/BoardItemAddButton.tsx
TypeScript
MethodDeclaration
isLoadingBoardIds ? ( <Loading
Aka-shi/querybook
querybook/webapp/components/BoardItemAddButton/BoardItemAddButton.tsx
TypeScript
ArrowFunction
async (): Promise<string> => { // TODO: const jobId = ulid() console.log('enqueue: ', jobId) return jobId }
mazgi/console
bff/src/lib/queue/ResourceManagementQueue.ts
TypeScript
ClassDeclaration
class ResourceManagementQueue implements AppQueue { private static queue: AppQueue | null = null enqueue = async (): Promise<string> => { // TODO: const jobId = ulid() console.log('enqueue: ', jobId) return jobId } constructor(connectionOption: { host: string; port: number }) { console.lo...
mazgi/console
bff/src/lib/queue/ResourceManagementQueue.ts
TypeScript
MethodDeclaration
static async getQueue(): Promise<AppQueue> { if (!this.queue) { const { redis } = await Config.getConfig() this.queue = new ResourceManagementQueue(redis) } return this.queue }
mazgi/console
bff/src/lib/queue/ResourceManagementQueue.ts
TypeScript
ArrowFunction
({ children }: Props) => { const [mounted, setMounted] = React.useState(false); useSSREffect(() => { setMounted(true); }, []); return <>{mounted && children}
ThibautMarechal/turborepo-remote-cache
app/component/NoSsr.tsx
TypeScript
ArrowFunction
() => { setMounted(true); }
ThibautMarechal/turborepo-remote-cache
app/component/NoSsr.tsx
TypeScript
TypeAliasDeclaration
type Props = { children?: React.ReactNode; };
ThibautMarechal/turborepo-remote-cache
app/component/NoSsr.tsx
TypeScript
FunctionDeclaration
export default function withTwindApp<Base = typeof App>( config?: Configuration, BaseApp?: Base, ): Base
akash-joshi/use-twind-with
packages/next/app.ts
TypeScript
FunctionDeclaration
export default function withTwindApp<Base = typeof App>(BaseApp?: Base): Base
akash-joshi/use-twind-with
packages/next/app.ts
TypeScript
FunctionDeclaration
export default function withTwindApp<Base = typeof App>( configOrBase?: Configuration | Base, BaseApp?: Base, ): Base { if (typeof configOrBase == 'function') { BaseApp = configOrBase configOrBase = {} } // If this run on the server _document.js has already done the setup if (typeof window !== 'un...
akash-joshi/use-twind-with
packages/next/app.ts
TypeScript
ArrowFunction
pessoa => { this.funcionario.pessoa = this.pessoa = { id: pessoa.id, nome: pessoa.nome } }
AntonioLimaSilva/System-UI
src/app/funcionario/cadastro-funcionario/cadastro-funcionario.component.ts
TypeScript
ArrowFunction
id => { form.reset(); this.toastyService.success('Funcionário salvo com sucesso!'); }
AntonioLimaSilva/System-UI
src/app/funcionario/cadastro-funcionario/cadastro-funcionario.component.ts
TypeScript
ArrowFunction
ex => { this.toastyService.error('Erro tentando salvar funcionário'); return Observable.throw(this.errorHandlerService.handle(ex.error[0].messageUser)); }
AntonioLimaSilva/System-UI
src/app/funcionario/cadastro-funcionario/cadastro-funcionario.component.ts
TypeScript
ClassDeclaration
@Component({ selector: 'npj-cadastro-funcionario', templateUrl: './cadastro-funcionario.component.html' }) export class CadastroFuncionarioComponent implements OnInit { pessoa: any; funcionario = new Funcionario(); constructor( private funcionarioService: FuncionarioService, private toastyService:...
AntonioLimaSilva/System-UI
src/app/funcionario/cadastro-funcionario/cadastro-funcionario.component.ts
TypeScript
MethodDeclaration
ngOnInit() { this.funcionarioService.findByPessoaId().subscribe(pessoa => { this.funcionario.pessoa = this.pessoa = { id: pessoa.id, nome: pessoa.nome } }); }
AntonioLimaSilva/System-UI
src/app/funcionario/cadastro-funcionario/cadastro-funcionario.component.ts
TypeScript
MethodDeclaration
save(form: FormGroup) { this.funcionarioService.save(this.funcionario).subscribe(id => { form.reset(); this.toastyService.success('Funcionário salvo com sucesso!'); }, ex => { this.toastyService.error('Erro tentando salvar funcionário'); return Observable.throw(this.errorHandlerService...
AntonioLimaSilva/System-UI
src/app/funcionario/cadastro-funcionario/cadastro-funcionario.component.ts
TypeScript
ArrowFunction
() => { test('is rendered', () => { const component = render( <EuiSuggest {...requiredProps} suggestions={sampleItems} /> ); expect(component).toMatchSnapshot(); }); describe('props', () => { describe('status', () => { ALL_STATUSES.forEach((status) => { test(`status: ${statu...
johnbarrierwilson/eui
src/components/suggest/suggest.test.tsx
TypeScript
ArrowFunction
() => { const component = render( <EuiSuggest {...requiredProps} suggestions={sampleItems} /> ); expect(component).toMatchSnapshot(); }
johnbarrierwilson/eui
src/components/suggest/suggest.test.tsx
TypeScript
ArrowFunction
() => { describe('status', () => { ALL_STATUSES.forEach((status) => { test(`status: ${status} is rendered`, () => { const component = render( <EuiSuggest {...requiredProps} suggestions={sampleItems} status={status} /> ...
johnbarrierwilson/eui
src/components/suggest/suggest.test.tsx
TypeScript
ArrowFunction
() => { ALL_STATUSES.forEach((status) => { test(`status: ${status} is rendered`, () => { const component = render( <EuiSuggest {...requiredProps} suggestions={sampleItems} status={status} /> ); expect(compone...
johnbarrierwilson/eui
src/components/suggest/suggest.test.tsx
TypeScript
ArrowFunction
(status) => { test(`status: ${status} is rendered`, () => { const component = render( <EuiSuggest {...requiredProps} suggestions={sampleItems} status={status} /> ); expect(component).toMatchSnapshot(); }); ...
johnbarrierwilson/eui
src/components/suggest/suggest.test.tsx
TypeScript
ArrowFunction
() => { const component = render( <EuiSuggest {...requiredProps} suggestions={sampleItems} status={status} /> ); expect(component).toMatchSnapshot(); }
johnbarrierwilson/eui
src/components/suggest/suggest.test.tsx
TypeScript
ArrowFunction
() => { const component = render( <EuiSuggest {...requiredProps} suggestions={sampleItems} append={<span>Appended</span>} /> ); expect(component).toMatchSnapshot(); }
johnbarrierwilson/eui
src/components/suggest/suggest.test.tsx
TypeScript
ArrowFunction
() => { ALL_STATUSES.forEach((status) => { test(`tooltipContent for status: ${status} is rendered`, () => { const component = render( <EuiSuggest {...requiredProps} suggestions={sampleItems} status={status} tooltipContent={stat...
johnbarrierwilson/eui
src/components/suggest/suggest.test.tsx
TypeScript
ArrowFunction
(status) => { test(`tooltipContent for status: ${status} is rendered`, () => { const component = render( <EuiSuggest {...requiredProps} suggestions={sampleItems} status={status} tooltipContent={status} /> ); ...
johnbarrierwilson/eui
src/components/suggest/suggest.test.tsx
TypeScript
ArrowFunction
() => { const component = render( <EuiSuggest {...requiredProps} suggestions={sampleItems} status={status} tooltipContent={status} /> ); expect(component).toMatchSnapshot(); }
johnbarrierwilson/eui
src/components/suggest/suggest.test.tsx
TypeScript
ArrowFunction
() => { const component = mount( <EuiSuggest {...requiredProps} suggestions={sampleItems} isVirtualized /> ); expect(component).toMatchSnapshot(); }
johnbarrierwilson/eui
src/components/suggest/suggest.test.tsx
TypeScript
ArrowFunction
() => { const component = mount( <EuiSuggest {...requiredProps} suggestions={sampleItems} maxHeight="50vh" /> ); expect(component).toMatchSnapshot(); }
johnbarrierwilson/eui
src/components/suggest/suggest.test.tsx
TypeScript
ArrowFunction
() => { test('standard', () => { const _sampleItems: EuiSuggestionProps[] = sampleItems.map( (item, idx) => ({ ...item, labelDisplay: idx === 0 ? 'fixed' : 'expand', descriptionDisplay: idx === 0 ? 'truncate' : 'wrap', labelWidth: idx === 0 ? '70'...
johnbarrierwilson/eui
src/components/suggest/suggest.test.tsx
TypeScript
ArrowFunction
() => { const _sampleItems: EuiSuggestionProps[] = sampleItems.map( (item, idx) => ({ ...item, labelDisplay: idx === 0 ? 'fixed' : 'expand', descriptionDisplay: idx === 0 ? 'truncate' : 'wrap', labelWidth: idx === 0 ? '70' : 80, }) ); ...
johnbarrierwilson/eui
src/components/suggest/suggest.test.tsx
TypeScript
ArrowFunction
(item, idx) => ({ ...item, labelDisplay: idx === 0 ? 'fixed' : 'expand', descriptionDisplay: idx === 0 ? 'truncate' : 'wrap', labelWidth: idx === 0 ? '70' : 80, })
johnbarrierwilson/eui
src/components/suggest/suggest.test.tsx
TypeScript
ArrowFunction
() => { const _sampleItems: EuiSuggestionProps[] = sampleItems.map((item) => ({ ...item, 'aria-label': 'sampleItem', 'data-test-subj': 'sampleItem', className: 'sampleItem', id: 'sampleItem', })); const component = render( <EuiSuggest ...
johnbarrierwilson/eui
src/components/suggest/suggest.test.tsx
TypeScript
ArrowFunction
(item) => ({ ...item, 'aria-label': 'sampleItem', 'data-test-subj': 'sampleItem', className: 'sampleItem', id: 'sampleItem', })
johnbarrierwilson/eui
src/components/suggest/suggest.test.tsx
TypeScript
ArrowFunction
() => { it('passes an onChange callback to the underlying EuiSelectable, which will fire on list item clicks and enter keypresses', () => { const onItemClick = jest.fn(); const component = shallow( <EuiSuggest {...requiredProps} suggestions={sampleItems} ...
johnbarrierwilson/eui
src/components/suggest/suggest.test.tsx
TypeScript
ArrowFunction
() => { const onItemClick = jest.fn(); const component = shallow( <EuiSuggest {...requiredProps} suggestions={sampleItems} onItemClick={onItemClick} /> ); const options = component.find(EuiSelectable).prop('options'); opti...
johnbarrierwilson/eui
src/components/suggest/suggest.test.tsx
TypeScript
ArrowFunction
() => { const component = render( <EuiSuggest {...requiredProps} suggestions={sampleItems} name="testName" id="testId" placeholder="Start typing" value="Controlled value" isInvalid={true} compressed={true} fullWidth...
johnbarrierwilson/eui
src/components/suggest/suggest.test.tsx
TypeScript
ClassDeclaration
@NgModule({ declarations: [ BoringAvatarBeamComponent ], imports: [ ], exports: [ BoringAvatarBeamComponent ] }) export class BoringAvatarBeamModule { }
28Smiles/boring-avatars
projects/ngx-boring-avatars/src/lib/boring-avatar-beam.module.ts
TypeScript
ArrowFunction
() => { it('should return an array containing the normalized versions', () => { const versions = ['1.0.0', '2.0', '3', '1.0.0-beta', '2.0-beta', '2-beta'] const result = normalizeVersionsToSemver(versions) expect(result) .to.be.an('array') .deep.equal([ '1.0.0', '2.0.0', ...
LcTwisk/electrode-native
ern-core/test/normalizeVersionsToSemver-test.ts
TypeScript
ArrowFunction
() => { const versions = ['1.0.0', '2.0', '3', '1.0.0-beta', '2.0-beta', '2-beta'] const result = normalizeVersionsToSemver(versions) expect(result) .to.be.an('array') .deep.equal([ '1.0.0', '2.0.0', '3.0.0', '1.0.0-beta', '2.0.0-beta', '2.0.0-bet...
LcTwisk/electrode-native
ern-core/test/normalizeVersionsToSemver-test.ts
TypeScript
ClassDeclaration
export class TestContract__factory extends ContractFactory { constructor(signer?: Signer) { super(_abi, _bytecode, signer); } deploy( _amount: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<TestContract> { return super.deploy(_amount, overrides || {}) as P...
0xWWW/TypeChain-1
packages/hardhat/test/fixture-projects/hardhat-project/typechain/factories/TestContract__factory.ts
TypeScript
MethodDeclaration
deploy( _amount: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<TestContract> { return super.deploy(_amount, overrides || {}) as Promise<TestContract>; }
0xWWW/TypeChain-1
packages/hardhat/test/fixture-projects/hardhat-project/typechain/factories/TestContract__factory.ts
TypeScript
MethodDeclaration
getDeployTransaction( _amount: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): TransactionRequest { return super.getDeployTransaction(_amount, overrides || {}); }
0xWWW/TypeChain-1
packages/hardhat/test/fixture-projects/hardhat-project/typechain/factories/TestContract__factory.ts
TypeScript
MethodDeclaration
attach(address: string): TestContract { return super.attach(address) as TestContract; }
0xWWW/TypeChain-1
packages/hardhat/test/fixture-projects/hardhat-project/typechain/factories/TestContract__factory.ts
TypeScript
MethodDeclaration
connect(signer: Signer): TestContract__factory { return super.connect(signer) as TestContract__factory; }
0xWWW/TypeChain-1
packages/hardhat/test/fixture-projects/hardhat-project/typechain/factories/TestContract__factory.ts
TypeScript
MethodDeclaration
static createInterface(): TestContractInterface { return new utils.Interface(_abi) as TestContractInterface; }
0xWWW/TypeChain-1
packages/hardhat/test/fixture-projects/hardhat-project/typechain/factories/TestContract__factory.ts
TypeScript
MethodDeclaration
static connect( address: string, signerOrProvider: Signer | Provider ): TestContract { return new Contract(address, _abi, signerOrProvider) as TestContract; }
0xWWW/TypeChain-1
packages/hardhat/test/fixture-projects/hardhat-project/typechain/factories/TestContract__factory.ts
TypeScript
ClassDeclaration
@Component({ selector: 'app-advantages-panel', templateUrl: './advantages-panel.component.html', styleUrls: ['./advantages-panel.component.scss'] }) export class AdvantagesPanelComponent implements OnInit { constructor() { } ngOnInit() { } }
pu1se/Shape-me
Web/src/app/pages/home/advantages-panel/advantages-panel.component.ts
TypeScript
ArrowFunction
(event) => { if (event.target == foundOrderModal) { $(()=>{ $('#foundOrderModal').fadeOut();}) } else if(event.target == orderModal){ $(()=>{ $('#orderModal').fadeOut();}) } }
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
()=>{ $('#foundOrderModal').fadeOut();}
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
()=>{ $('#orderModal').fadeOut();}
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
()=>{ if(mode == 'in'){ $('#orderModal').fadeIn(); } else if(mode == 'out'){ $('#orderModal').fadeOut(); } }
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
()=>{ if(mode == 'in'){ $('#foundOrderModal').fadeIn(); } else if(mode == 'out'){ $('#foundOrderModal').fadeOut(); } }
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
()=>{ if(event == 'foundOrderModal'){ $('#foundOrderModal').fadeOut(); } else if(event == 'orderModal'){ $('#orderModal').fadeOut(); } }
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
(authorizedUser:any)=>{ if(authorizedUser.success == true){ this.ordersService.makeOrder(authorizedUser.userId,orderName,orderDescription).subscribe((res:any)=>{ if(res.success == false){ this.notificationService.showError(res.message,"Ordering failed"); } ...
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
(res:any)=>{ if(res.success == false){ this.notificationService.showError(res.message,"Ordering failed"); } else if(res.success == true){ if(this.url != null && this.orderImage != ""){ this.ordersService.addOrderImage(res.order.insert...
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
(result:any)=>{ if(result.success != true){ this.notificationService.showError('Error! Image not uploaded',"Upload image unsuccessful") } }
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
()=>{ $(`#${fieldName}`).addClass('dangerField'); }
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
()=> $(`#${fieldName}`).removeClass('dangerField')
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
(_event) => { this.msg = ""; this.url = reader.result; }
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
()=>{ $('#orderName').val(""); $('#description').val("") }
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
(user:any)=>{ if(user.success == true){ this.orders.splice(0,this.orders.length); this.ordersService.getUserOrders(user.userId).subscribe((res:any)=>{ res.orders.forEach(order => { this.ordersService.isOrderFound(order.order_id).subscribe((isFound:any)=>{ if(is...
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
(res:any)=>{ res.orders.forEach(order => { this.ordersService.isOrderFound(order.order_id).subscribe((isFound:any)=>{ if(isFound.success == true && isFound.status == 200){ this.pushInOrders(order,true); } else if(isFound.success == true ...
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
order => { this.ordersService.isOrderFound(order.order_id).subscribe((isFound:any)=>{ if(isFound.success == true && isFound.status == 200){ this.pushInOrders(order,true); } else if(isFound.success == true && isFound.status==404){ t...
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
(isFound:any)=>{ if(isFound.success == true && isFound.status == 200){ this.pushInOrders(order,true); } else if(isFound.success == true && isFound.status==404){ this.pushInOrders(order,false); } }
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
(res:any)=>{ if(res.success == true){ var index = this.orders.findIndex(order =>{ return order.orderId == orderId; }) this.orders.splice(index,1); this.notificationService.showSuccess(`Order was deleted`, 'One Order removed successfully'); } }
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
order =>{ return order.orderId == orderId; }
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
(isVendor:any)=>{ if(isVendor.success == true){ vendorId = isVendor.sellerId; } }
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
(res:any)=>{ this.orders.splice(0,this.orders.length); if(res.success == true){ this.vendorCheckedOrders.splice(0,this.vendorCheckedOrders.length); res.orders.forEach(order => { this.ordersService.isOrderChecked(vendorId,order.order_id).subscribe((isChecked: any)=>{...
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
order => { this.ordersService.isOrderChecked(vendorId,order.order_id).subscribe((isChecked: any)=>{ if(isChecked.success == true && isChecked.status == 200){ // this.vendorCheckedOrders.push(order); this.getVendorCheckedOuts(order); } ...
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
(isChecked: any)=>{ if(isChecked.success == true && isChecked.status == 200){ // this.vendorCheckedOrders.push(order); this.getVendorCheckedOuts(order); } else if(isChecked.success == false && isChecked.status == 200){ ...
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
()=>{ if(event == 'open'){ this.wasChecked=false; this.orders.forEach(order => { if(order.orderId == orderId){ this.exploreOrder = Object.assign({},order) } }) $('#exploreOrderModal').fadeIn() } else if(event == 'close'){ $('#e...
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
order => { if(order.orderId == orderId){ this.exploreOrder = Object.assign({},order) } }
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
(event) => { if(event.target == document.getElementById('exploreOrderModal')){ $('#exploreOrderModal').fadeOut() } }
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
order=> { if(order.orderId == orderId){ this.exploreOrder = Object.assign({},order); } }
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript
ArrowFunction
(res:any)=>{ res.foundOrder.forEach(foundOrder => { this.vendorsService.getVendorInfo(foundOrder.seller).subscribe((vendor:any)=>{ this.foundOrder.orderName= this.exploreOrder.orderName; this.foundOrder.orderedDate=this.exploreOrder.orderDate; this.foundOrder.checkedSell...
PatrickNiyogitare28/Fimbo-Client-App-Angular-8
src/app/components/customer-orders/customer-orders.component.ts
TypeScript