Skip to content

Instantly share code, notes, and snippets.

View agrgic16's full-sized avatar

Ante Grgić agrgic16

  • Grgic Consulting
  • Denver, CO
View GitHub Profile
@agrgic16
agrgic16 / CustomWebstoreCaseRequestService.cs
Created March 14, 2023 02:39
Override the znode WebStoreCaseRequestService
using Znode.Engine.Api.Models;
using Znode.Engine.ERPConnector.Model.ChatGPTConnector;
using Znode.Engine.Services;
using Znode.Libraries.ECommerce.Utilities;
using Znode.Libraries.Framework.Business;
using Znode.Libraries.Observer;
namespace Znode.Api.Custom
{
public class CustomWebStoreCaseRequestService : WebStoreCaseRequestService, IWebStoreCaseRequestService
@agrgic16
agrgic16 / tasks.service.ts
Created May 17, 2019 18:11
[BLOG] Vue Service for connecting to a json-server
import Task from '../models/task.model';
export class TasksService {
private readonly apiPath = 'http://localhost:3000/tasks';
private readonly contentTypeHeader = { 'Content-Type': 'application/json' };
private static async handleResponse(resp: Response) {
// fetch does not automatically throw on error response
if (!resp.ok) throw new Error(`Fetch Error: \n ${await resp.text()}`);
@agrgic16
agrgic16 / Home.vue
Last active May 17, 2019 18:09
[BLOG] Vue Todo App Example
<template>
<div class="home">
<div class="row">
<input type="text"
class="form-field"
v-model="newTask.name"
placeholder="Enter a new task">
<button class="create"
:disabled="!newTask.name"
@agrgic16
agrgic16 / db.json
Last active May 17, 2019 18:05
[BLOG] db.json sample for json-server blog post
{
"tasks": [
{
"name": "Learn VueJS",
"complete": true,
"id": 0
},
{
"name": "Implement JSON-Server in a VueJS app",
"complete": true,
@agrgic16
agrgic16 / routes.ts
Last active April 24, 2019 21:10
Dialog configuration in routing config
export const routes: Routes = [
{
path: 'home',
component: DialogParentExample,
children: [
{
path: 'some-dialog-path',
component: DialogOverviewExampleDialog,
resolve: { dlgRef: DialogResolverService },
data: {
@agrgic16
agrgic16 / dialog-parent-example.ts
Created April 24, 2019 20:44
dialog parent example with no dialog or routing logic
@Component({
selector: 'dialog-parent-example',
templateUrl: 'dialog-parent-example.html',
styleUrls: ['dialog-parent-example.css'],
})
export class DialogParentExample {
}
@agrgic16
agrgic16 / dialog-parent-example.ts
Last active August 12, 2022 18:22
dialog parent example from route
@Component({
selector: 'dialog-parent-example',
templateUrl: 'dialog-parent-example.html',
styleUrls: ['dialog-parent-example.css'],
})
export class DialogParentExample {
routeQueryParams: Subscription;
constructor(public dialog: MatDialog, private route: ActivatedRoute) {}
ngOnInit() {
@agrgic16
agrgic16 / dialog-parent-example.ts
Last active April 24, 2019 21:13
Typical Angular Material Dialog Parent
@Component({
selector: 'dialog-parent-example',
templateUrl: 'dialog-parent-example.html',
styleUrls: ['dialog-parent-example.css'],
})
export class DialogParentExample {
constructor(public dialog: MatDialog) {}
openDialog(): void {
const dialogRef = this.dialog.open(DialogOverviewExampleDialog, {