Skip to content

Instantly share code, notes, and snippets.

View dosandk's full-sized avatar

Volodymyr Shevchuk dosandk

View GitHub Profile
import { HttpException, HttpStatus, Injectable, NotFoundException } from '@nestjs/common';
import { InjectModel } from '@nestjs/mongoose';
import { Model, Types } from 'mongoose';
import { TaskDto } from './dto/task.dto';
import { Task } from './types/task.interface';
import { Track } from '../tracks/types/track.interface';
import { User } from '../users/types/user.interface';
import { TaskInProgress } from './types/task-in-progress.interface';
import { SaveTaskProgressDto } from './dto/save-task-progress.dto';
import { FormBuilder } from '../../../../modules/form-builder';
import { Validators } from '../../../../modules/form-builder/validators';
class SomeForm {
element;
subElements = {};
constructor(data) {
this.data = data;
class Card {
total = 0;
constructor ({
title = '',
formatTotal = data => data
} = {}) {
this.title = title;
this.formatTotal = formatTotal;
<!DOCTYPE HTML>
<meta charset="utf-8">
<head>
<title>Админка для магазина</title>
<link rel="apple-touch-icon-precomposed" href="./assets/favicon/apple-touch-icon-precomposed.png">
<link rel="icon" href="./assets/favicon/favicon.png">
<link rel="stylesheet" href="./styles/all.css">
<link rel="stylesheet" href="style.css">
</head>
root = true
[*.{html,js,css,scss,json}]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@dosandk
dosandk / static.html
Created February 2, 2022 15:47
02-sortable-table-v1
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<!DOCTYPE html>
<meta charset="UTF-8">
<body></body>
<div id="root"></div>
<script>
class Component {
json;
@dosandk
dosandk / index.js
Created April 10, 2021 21:45
Fixed SortableTable v3
import fetchJson from './utils/fetch-json.js';
const BACKEND_URL = 'https://course-js.javascript.ru/';
export default class SortableTable {
constructor(
header = [],
{ url = '' }
) {
@dosandk
dosandk / index.spec.js
Created April 8, 2021 18:56
Fixed tests for async ColumnChart
import ColumnChart from '../solution/index';
import ordersData from "./__mocks__/orders-data.js";
describe('async-code-fetch-api-part-1/column-chart', () => {
let columnChart;
beforeEach(() => {
fetchMock
.mockResponse(JSON.stringify(ordersData));