Skip to content

Commit

Permalink
Final project
Browse files Browse the repository at this point in the history
  • Loading branch information
Ber1984 committed Sep 20, 2020
1 parent ae93db2 commit 569226e
Show file tree
Hide file tree
Showing 14 changed files with 311 additions and 85 deletions.
4 changes: 2 additions & 2 deletions backend/src/task/entities/tasks.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export class Task {
description: string;

@CreateDateColumn({ type: 'timestamp' })
createdAt: Date;
created_at: Date;

@CreateDateColumn({ type: 'timestamp' })
updatedAt: Date;
updated_at: Date;
}
17 changes: 13 additions & 4 deletions backend/src/task/task.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,21 @@ export class TaskController {
}

@Put(':id')
updateOne(@Param('id', ParseIntPipe) id: number, @Body() dto: EditTasksDto) {
return this.taskService.updateOne(id, dto);
async updateOne(
@Param('id', ParseIntPipe) id: number,
@Body() dto: EditTasksDto,
) {
const data = await this.taskService.updateOne(id, dto);
return {
message: 'Task has been successfully updated.',
};
}

@Delete(':id')
deleteOne(@Param('id', ParseIntPipe) id: number) {
return this.taskService.deleteOne(id);
async deleteOne(@Param('id', ParseIntPipe) id: number) {
const data = await this.taskService.deleteOne(id);
return {
message: 'Task has been successfully deleted.',
};
}
}
68 changes: 68 additions & 0 deletions base_datos/tasks.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 20, 2020 at 11:26 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.4

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `tasks`
--

-- --------------------------------------------------------

--
-- Table structure for table `tasks`
--

CREATE TABLE `tasks` (
`id` int(11) NOT NULL,
`description` text NOT NULL,
`created_at` timestamp(6) NOT NULL DEFAULT current_timestamp(6),
`updated_at` timestamp(6) NOT NULL DEFAULT current_timestamp(6),
`name` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `tasks`
--

INSERT INTO `tasks` (`id`, `description`, `created_at`, `updated_at`, `name`) VALUES
(1, 'we need to pray for 30', '2020-09-20 21:24:33.107766', '2020-09-20 21:24:33.107766', 'Pray with my family');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `tasks`
--
ALTER TABLE `tasks`
ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `tasks`
--
ALTER TABLE `tasks`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
7 changes: 6 additions & 1 deletion client/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
# client

## Project setup
## Project setup and rebuild node modules

```
npm install
```

### Compiles and hot-reloads for development

```
npm run serve
```

### Compiles and minifies for production

```
npm run build
```

### Lints and fixes files

```
npm run lint
```

### Customize configuration

See [Configuration Reference](https://cli.vuejs.org/config/).
92 changes: 82 additions & 10 deletions client/package-lock.json

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

10 changes: 8 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@
"dependencies": {
"axios": "^0.20.0",
"bootstrap": "^4.5.2",
"bootstrap-validator": "^0.11.9",
"bootstrap-vue": "^2.17.3",
"core-js": "^3.6.5",
"jquery": "^3.5.1",
"popper.js": "^1.16.1",
"vue": "^2.6.11",
"vue-router": "^3.4.3"
"portal-vue": "^2.1.7",
"swiper": "^6.2.0",
"vue": "^2.6.12",
"vue-notification": "^1.3.20",
"vue-router": "^3.4.3",
"vuelidate": "^0.7.5"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
Expand Down
Loading

0 comments on commit 569226e

Please sign in to comment.