This file contains 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 axios from 'axios'; | |
class Service { | |
constructor() { | |
let service = axios.create({ | |
headers: {csrf: 'token'} | |
}); | |
service.interceptors.response.use(this.handleSuccess, this.handleError); | |
this.service = service; | |
} |
This file contains 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
public searchOption = {'searchFeild': 'tag', 'orderByKey': 'isActive', 'orderBy': 'asc'}; | |
import { Pipe, PipeTransform } from '@angular/core'; | |
export interface SearchOption { | |
searchFeild: string; // Search By specific object keyName | |
orderByKey: string; // Order By specific object key | |
orderBy: string; // OrderBy asc/desc | |
} | |
@Pipe({ | |
name: 'searchfilter' |
This file contains 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
let query = 'select * from data where id=:id and test=:test'; | |
let data = { | |
id:1, | |
test:11, | |
} | |
let data1 = { | |
id:1 | |
} |
This file contains 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
export const ValidateSchema = (values, schema) => { | |
return new Promise((resolve, reject) => { | |
const { value, error } = schema.validate(values); | |
const valid = error == null; | |
if (valid) { | |
resolve(value); | |
} else { | |
const { details } = error; | |
const message = details.map((i) => i.message).join(","); | |
reject(message); |
This file contains 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
<link href="https://fonts.googleapis.com/css?family=Lato:400,700&display=swap&subset=latin-ext" rel="stylesheet"> |
This file contains 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
public formatDate() { | |
return moment.utc(new Date().toISOString().replace(/T/, ' ').slice(0, -1)).format('YYYY-MM-DD HH:mm:ss.SSS'); | |
} |
This file contains 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
const query :any= 'select a, b.d,ROW_NUMBER() OVER(ORDER BY col DESC),b.e as f,c as g from const'; | |
const test = (query:any, offset:any,limit:any)=>{ | |
let data:any = query.split('from')[0]; | |
data = data.split('FROM')[0]; | |
let tempQuery:any = data.split(','); | |
let queryt:any = `${tempQuery[0]}`; |
This file contains 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
{ | |
"editor.codeActionsOnSave": { | |
"source.fixAll.eslint": true | |
}, | |
"eslint.validate": ["javascript"] | |
} |
This file contains 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
.select-style { | |
padding: 0; | |
margin: 0; | |
border: 1px solid #ccc; | |
width: 120px; | |
border-radius: 3px; | |
overflow: hidden; | |
background-color: #fff; | |
background-size:10px 10px; | |
background: #fff url("https://image.flaticon.com/icons/svg/892/892498.svg") no-repeat 40% 50%; |
OlderNewer