Giter Site home page Giter Site logo

reform_estimate's People

Contributors

great084 avatar

Watchers

 avatar  avatar

reform_estimate's Issues

見積明細の登録・参照

見積り基本情報に対して、見積明細の登録・参照が行えるようにする。
登録は一括登録できるようにする

  • cocoonの導入
  • 登録フォームの作成

[改善]Uniqueness validatorを変更する

概要(要件)

Uniqueness validatorは廃止予定のため、変更すること

DEPRECATION WARNING: Uniqueness validator will no longer enforce case sensitive comparison in Rails 6.1. To continue case sensitive comparison on the :specification attribute in PriceTable model, pass case_sensitive: true option explicitly to the uniqueness validator. (called from update at /Users/hiro/app/reform_estimate/app/controllers/price_tables_controller.rb:14)

解決方法(実装)

タスク

  • xxxx

pdf出力の実装

概要

作成した見積明細をpdf出力させる
見積概要 + 見積明細

タスク

  • 出力対象データの確定
  • レイアウトの作成
  • ツールの選定
  • 実装

flashメッセージが表示されない。

flashメッセージの定義を行っているにも関わらず、画面に表示されない

  • コントローラ(estimates_controller.rb )
  def create
    @estimate = Estimate.new(estimate_params)
    if @estimate.save
      flash.now[:success] = "見積を作成しました"
      redirect_to estimates_path
    else
      puts "#{@estimate.errors.full_messages}"
      flash.now[:danger] = "見積作成に失敗しました"
      render :new
    end
  end
  • ビュー(app/views/layouts/application.html.erb)
    <p class="notice"><%= notice %></p>
    <p class="alert"><%= alert %></p>

ER-図の作成

ER−図を作成する。

以下が対象
User(ユーザ)
Estimate(見積)
Estimate(見積詳細)
UnitPrice(単価表)
Category(カテゴリー)

wireframeの作成

王道パターンの以下

  • 見積もりの作成→詳細編集(単価表読み込み)→参照→出力
  • 単価表の作成&編集
  • カテゴリーの作成&編集

model・DBの作成

以下のモデルDBを作成する。

  • Estimate
  • EstimateDetail
  • UnitPrice
  • Category

見積作成画面へマスタの内容の反映

見積作成画面で、カテゴリ、名称、仕様を指定すると、該当する単価をマスタから引っ張ってこれるようにする。
カテゴリを選択→ 該当する名称の候補がプルダウン表示
名称を選択→該当する仕様の候補がプルダウン表示

[機能追加]初期データ登録

概要(要件)

初期データの登録

実現方法(実装)

seedデータを作成する
対象:User, Category, UnitPrice, Estimate, EstimateDetail

タスク

  • seedファイルの作成

seedデータの充実

概要(要件)

seedデータを充実させる
test userの全カテゴリに単価を登録させる

解決方法(実装)

タスク

  • xxxx

railsプロジェクトを作成する

概要

rails プロジェクトを作成する。
その際にruby, railsのバージョンおよびオプションを考えること

タスク

  • バージョンの調査決定
  • オプションの調査決定
  • Gemfileの追加修正
  • bundle install
  • DB設定
  • rails初期画面の表示

マスタ(カテゴリ、単価表)の登録/機能の作成

マスタの登録参照機能を作成する

対象:カテゴリ、単価表
同じ画面で登録できると良い

実装

veiw

views配下に、master/index.html.erb(参照と登録共通)
パーシャルとして、_categories_form, _unit_price_form

parameter

type: post

controller

masterコントローラ
index → 直近のcategory, unit_priceの一覧を提供
upsert_categories → カテゴリーの更新
upsert_price_tables → 単価表の更新

  xxxx.find_or_initialize_by(key: params[:key])
  xxxx.update(name: params[:value]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.