Skip to content

Commit

Permalink
🎨 Add Sms Index
Browse files Browse the repository at this point in the history
  • Loading branch information
saleem-hadad committed Jan 10, 2022
1 parent 564b6c1 commit 7ced170
Show file tree
Hide file tree
Showing 13 changed files with 471 additions and 17 deletions.
13 changes: 13 additions & 0 deletions app/Http/Controllers/SmsController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace App\Http\Controllers;

use Inertia\Inertia;

class SmsController extends Controller
{
public function index()
{
return Inertia::render('Sms/Index');
}
}
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"laravel/sanctum": "^2.8",
"laravel/telescope": "^4.6",
"laravel/tinker": "^2.5",
"mll-lab/graphql-php-scalars": "^5.2",
"mll-lab/laravel-graphql-playground": "^2.5",
"nuwave/lighthouse": "^5.33",
"tightenco/ziggy": "^1.0"
Expand Down
126 changes: 125 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ scalar Date @scalar(class: "Nuwave\\Lighthouse\\Schema\\Types\\Scalars\\Date")
"A datetime string with format `Y-m-d H:i:s`, e.g. `2018-05-23 13:43:32`."
scalar DateTime @scalar(class: "Nuwave\\Lighthouse\\Schema\\Types\\Scalars\\DateTime")

scalar Json @scalar(class: "MLL\\GraphQLScalars\\JSON")

type Category {
id: ID!
name: String!
Expand All @@ -29,6 +31,13 @@ type TransactionStatistics {
category: Category
}

type Sms {
id: ID!
body: String!
transaction_id: Int
meta: Json
}

type Query {
transactions: [Transaction!]! @paginate(defaultCount: 25) @orderBy(column: id direction: DESC)

Expand All @@ -38,6 +47,8 @@ type Query {
allCategories: [Category!]! @all
categories: [Category!]! @paginate(defaultCount: 25) @orderBy(column: id direction: DESC)

sms: [Sms!]! @paginate(defaultCount: 100) @orderBy(column: id direction: DESC)

totalExpenses: Float! @aggregate(model: Transaction column: amount function: SUM scopes:["expenses"])
totalIncome: Float! @aggregate(model: Transaction column: amount function: SUM scopes: ["income"])
expensesPerCategory: [TransactionStatistics!]!
Expand Down
11 changes: 4 additions & 7 deletions public/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -805,9 +805,6 @@ select {
.w-6 {
width: 1.5rem;
}
.w-1\/2 {
width: 50%;
}
.w-4 {
width: 1rem;
}
Expand Down Expand Up @@ -1007,14 +1004,14 @@ select {
--tw-bg-opacity: 1;
background-color: rgb(107 114 128 / var(--tw-bg-opacity));
}
.bg-blue-500 {
--tw-bg-opacity: 1;
background-color: rgb(59 130 246 / var(--tw-bg-opacity));
}
.bg-gray-50 {
--tw-bg-opacity: 1;
background-color: rgb(249 250 251 / var(--tw-bg-opacity));
}
.bg-blue-500 {
--tw-bg-opacity: 1;
background-color: rgb(59 130 246 / var(--tw-bg-opacity));
}
.bg-opacity-75 {
--tw-bg-opacity: 0.75;
}
Expand Down
Loading

0 comments on commit 7ced170

Please sign in to comment.